Changeset 211070 in webkit for trunk/Source/JavaScriptCore/jsc.cpp
- Timestamp:
- Jan 23, 2017, 4:15:21 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jsc.cpp
r211018 r211070 1012 1012 static EncodedJSValue JSC_HOST_CALL functionIsRope(ExecState*); 1013 1013 static EncodedJSValue JSC_HOST_CALL functionCallerSourceOrigin(ExecState*); 1014 static EncodedJSValue JSC_HOST_CALL functionGlobalObjectForObject(ExecState*); 1014 1015 1015 1016 struct Script { … … 1235 1236 addFunction(vm, "isRope", functionIsRope, 1); 1236 1237 addFunction(vm, "callerSourceOrigin", functionCallerSourceOrigin, 0); 1238 1239 addFunction(vm, "globalObjectForObject", functionGlobalObjectForObject, 1); 1237 1240 1238 1241 addFunction(vm, "is32BitPlatform", functionIs32BitPlatform, 0); … … 2154 2157 return JSValue::encode(jsNull()); 2155 2158 return JSValue::encode(jsString(state, sourceOrigin.string())); 2159 } 2160 2161 EncodedJSValue JSC_HOST_CALL functionGlobalObjectForObject(ExecState* exec) 2162 { 2163 JSValue value = exec->argument(0); 2164 RELEASE_ASSERT(value.isObject()); 2165 JSGlobalObject* globalObject = jsCast<JSObject*>(value)->globalObject(); 2166 RELEASE_ASSERT(globalObject); 2167 return JSValue::encode(globalObject); 2156 2168 } 2157 2169
Note:
See TracChangeset
for help on using the changeset viewer.