Move vmEntryGlobalObject() to VM from CallFrame.
https://bugs.webkit.org/show_bug.cgi?id=188900
<rdar://problem/43655753>
Reviewed by Michael Saboff.
Source/JavaScriptCore:
Also introduced CallFrame::isGlobalExec() which makes use of one property of
GlobalExecs to identify them i.e. GlobalExecs have null callerFrame and returnPCs.
CallFrame::initGlobalExec() ensures this.
In contrast, normal CallFrames always have a callerFrame (because they must at
least be preceded by a VM EntryFrame) and a returnPC (at least return to the
VM entry glue).
(handleExceptionIfNeeded):
(setException):
(JSEvaluateScript):
(JSCheckScriptSyntax):
(JSGlobalContextRetain):
(JSGlobalContextRelease):
(JSGlobalContextCopyName):
(JSGlobalContextSetName):
(JSGlobalContextGetRemoteInspectionEnabled):
(JSGlobalContextSetRemoteInspectionEnabled):
(JSGlobalContextGetIncludesNativeCallStackWhenReportingExceptions):
(JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions):
(JSGlobalContextGetDebuggerRunLoop):
(JSGlobalContextSetDebuggerRunLoop):
(JSGlobalContextGetAugmentableInspectorController):
(reportExceptionToInspector):
(jscContextForObject):
(jsc_context_evaluate_in_object):
(JSC::Debugger::pauseIfNeeded):
- debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::vmEntryGlobalObject const):
(JSC::DebuggerCallFrame::evaluateWithScopeExtension):
- interpreter/CallFrame.cpp:
(JSC::CallFrame::vmEntryGlobalObject): Deleted.
(JSC::ExecState::scope const):
(JSC::ExecState::noCaller):
(JSC::ExecState::isGlobalExec const):
- interpreter/Interpreter.cpp:
(JSC::notifyDebuggerOfUnwinding):
(JSC::Interpreter::notifyDebuggerOfExceptionToBeThrown):
(JSC::Interpreter::debug):
(JSC::profiledCall):
(JSC::evaluate):
(JSC::profiledEvaluate):
(JSC::evaluateWithScopeExtension):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):
(JSC::linkAndEvaluateModule):
(JSC::importModule):
- runtime/ConstructData.cpp:
(JSC::profiledConstruct):
(JSC::getStackTrace):
(JSC::VM::throwException):
(JSC::VM::vmEntryGlobalObject const):
Source/WebCore:
No new tests needed because this patch does not introduce new functionality.
- bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::create):
- bindings/js/JSDOMGlobalObject.cpp:
(WebCore::callerGlobalObject):
(WebCore::toJSDOMGlobalObject): Deleted.
- bindings/js/JSDOMWindowBase.cpp:
(WebCore::firstDOMWindow):
(JSC::Bindings::convertValueToNPVariant):
- bridge/objc/WebScriptObject.mm:
(WebCore::addExceptionToConsole):
- bridge/objc/objc_instance.mm:
(ObjcInstance::moveGlobalExceptionToExecState):
- bridge/objc/objc_runtime.mm:
(JSC::Bindings::convertValueToObjcObject):
- bridge/objc/objc_utility.mm:
(JSC::Bindings::convertValueToObjcValue):
(WebCore::Internals::cloneArrayBuffer):
Source/WebKitLegacy/mac:
- WebView/WebScriptDebugger.mm:
(WebScriptDebugger::sourceParsed):