libkroll/javascript/kjs_util.cpp
static JSValueRef GetArrayPrototype(JSContextRef jsContext, JSValueRef* exception) 
	{
		JSObjectRef globalObject = JSContextGetGlobalObject(jsContext);
		JSStringRef fnPropName = JSStringCreateWithUTF8CString("Array");
		JSValueRef fnCtorValue = JSObjectGetProperty(jsContext, globalObject,
			fnPropName, exception);
		JSStringRelease(fnPropName);
		if (!fnCtorValue) 
		{
			return JSValueMakeUndefined(jsContext);
		}

		JSObjectRef fnCtorObject = JSValueToObject(jsContext, fnCtorValue, exception);
		if (!fnCtorObject)
		{
			return JSValueMakeUndefined(jsContext);
		}

		JSStringRef protoPropName = JSStringCreateWithUTF8CString("prototype");
		JSValueRef fnPrototype = JSObjectGetProperty(jsContext, fnCtorObject,
			protoPropName, exception);
		JSStringRelease(protoPropName);
		if (!fnPrototype) 
		{
			return JSValueMakeUndefined(jsContext);
		}

		return fnPrototype;
	}
/*
	 * The following takes the prototype from the Array constructor, this allows
	 * us to easily support array-like functions
	 *
	 * NOTE: The return value is not protected.
	 */
The following takes the prototype from the Array constructor, this allows
us to easily support array-like functions

The return value is not protected.
The following takes the prototype from the Array constructor this allows us to easily support array - like functions The return value is not protected .
static JSValueRef GetArrayPrototype(JSContextRef jsContext, JSValueRef* exception) 
	{
		JSObjectRef globalObject = JSContextGetGlobalObject(jsContext);
		JSStringRef fnPropName = JSStringCreateWithUTF8CString("Array");
		JSValueRef fnCtorValue = JSObjectGetProperty(jsContext, globalObject,
			fnPropName, exception);
		JSStringRelease(fnPropName);
		if (!fnCtorValue) 
		{
			return JSValueMakeUndefined(jsContext);
		}
		JSObjectRef fnCtorObject = JSValueToObject(jsContext, fnCtorValue, exception);
		if (!fnCtorObject)
		{
			return JSValueMakeUndefined(jsContext);
		}
		JSStringRef protoPropName = JSStringCreateWithUTF8CString("prototype");
		JSValueRef fnPrototype = JSObjectGetProperty(jsContext, fnCtorObject,
			protoPropName, exception);
		JSStringRelease(protoPropName);
		if (!fnPrototype) 
		{
			return JSValueMakeUndefined(jsContext);
		}
		return fnPrototype;
	}
static JSValueRef GetArrayPrototype ( JSContextRef jsContext , JSValueRef * exception ) { JSObjectRef globalObject = JSContextGetGlobalObject ( jsContext ) ; JSStringRef fnPropName = JSStringCreateWithUTF8CString ( " " ) ; JSValueRef fnCtorValue = JSObjectGetProperty ( jsContext , globalObject , fnPropName , exception ) ; JSStringRelease ( fnPropName ) ; if ( ! fnCtorValue ) { return JSValueMakeUndefined ( jsContext ) ; } JSObjectRef fnCtorObject = JSValueToObject ( jsContext , fnCtorValue , exception ) ; if ( ! fnCtorObject ) { return JSValueMakeUndefined ( jsContext ) ; } JSStringRef protoPropName = JSStringCreateWithUTF8CString ( " " ) ; JSValueRef fnPrototype = JSObjectGetProperty ( jsContext , fnCtorObject , protoPropName , exception ) ; JSStringRelease ( protoPropName ) ; if ( ! fnPrototype ) { return JSValueMakeUndefined ( jsContext ) ; } return fnPrototype ; }
The following takes the prototype from the Array constructor, this allows
 us to easily support array-like functions
The following takes the prototype from the Array constructor this allows us to easily support array - like functions