Changeset 289417 in webkit for trunk/Source/JavaScriptCore/jsc.cpp
- Timestamp:
- Feb 8, 2022, 12:42:04 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jsc.cpp
r288442 r289417 50 50 #include "JSFinalizationRegistry.h" 51 51 #include "JSFunction.h" 52 #include "JSFunctionInlines.h" 52 53 #include "JSInternalPromise.h" 53 54 #include "JSLock.h" … … 367 368 static JSC_DECLARE_HOST_FUNCTION(functionDollarClearKeptObjects); 368 369 static JSC_DECLARE_HOST_FUNCTION(functionDollarGlobalObjectFor); 370 static JSC_DECLARE_HOST_FUNCTION(functionDollarIsRemoteFunction); 369 371 static JSC_DECLARE_HOST_FUNCTION(functionDollarAgentStart); 370 372 static JSC_DECLARE_HOST_FUNCTION(functionDollarAgentReceiveBroadcast); … … 650 652 addFunction(vm, dollar, "clearKeptObjects", functionDollarClearKeptObjects, 0, static_cast<unsigned>(PropertyAttribute::None)); 651 653 addFunction(vm, dollar, "globalObjectFor", functionDollarGlobalObjectFor, 1, static_cast<unsigned>(PropertyAttribute::None)); 654 addFunction(vm, dollar, "isRemoteFunction", functionDollarIsRemoteFunction, 1, static_cast<unsigned>(PropertyAttribute::None)); 652 655 653 656 dollar->putDirect(vm, Identifier::fromString(vm, "global"), globalThis()); … … 2083 2086 2084 2087 return JSValue::encode(jsUndefined()); 2088 } 2089 2090 JSC_DEFINE_HOST_FUNCTION(functionDollarIsRemoteFunction, (JSGlobalObject* globalObject, CallFrame* callFrame)) 2091 { 2092 VM& vm = globalObject->vm(); 2093 auto scope = DECLARE_THROW_SCOPE(vm); 2094 2095 if (callFrame->argumentCount() < 1) 2096 return JSValue::encode(throwException(globalObject, scope, createError(globalObject, "Not enough arguments"_s))); 2097 2098 JSValue arg = callFrame->argument(0); 2099 return JSValue::encode(jsBoolean(isRemoteFunction(vm, arg))); 2085 2100 } 2086 2101
Note:
See TracChangeset
for help on using the changeset viewer.