Ignore:
Timestamp:
Oct 23, 2010, 4:49:43 PM (15 years ago)
Author:
[email protected]
Message:

2010-10-23 Xan Lopez <[email protected]>

Reviewed by Sam Weinig.

Unify globalData APIs
https://bugs.webkit.org/show_bug.cgi?id=47969

Make JSGlobalObject::globalData return a reference and adapt
callers. This unifies the API with the existing
CallFrame::globalData, which also returns a reference.

  • debugger/Debugger.cpp: (JSC::evaluateInGlobalCallFrame):
  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp: (JSC::Interpreter::dumpRegisters):
  • jsc.cpp: (runWithScripts):
  • parser/JSParser.cpp: (JSC::jsParse):
  • parser/Parser.cpp: (JSC::Parser::parse):
  • parser/Parser.h: (JSC::Parser::parse):
  • runtime/Error.cpp: (JSC::createError): (JSC::createEvalError): (JSC::createRangeError): (JSC::createReferenceError): (JSC::createSyntaxError): (JSC::createTypeError): (JSC::createURIError):
  • runtime/FunctionConstructor.cpp: (JSC::constructFunction):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::~JSGlobalObject): (JSC::JSGlobalObject::markChildren):
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::globalData):

WebCore:

2010-10-23 Xan Lopez <[email protected]>

Reviewed by Sam Weinig.

Unify globalData APIs
https://bugs.webkit.org/show_bug.cgi?id=47969

Adapt code to JSGlobalObject::globalData returning a reference
instead of a pointer.

  • bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback):
  • bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
  • bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent):
  • bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::markChildren):
  • bindings/js/JSWorkerContextErrorHandler.cpp: (WebCore::JSWorkerContextErrorHandler::handleEvent):
  • bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::executeFunctionInContext):
  • bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate):
  • bridge/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Evaluate): (_NPN_Construct):

WebKit2:

2010-10-23 Xan Lopez <[email protected]>

Reviewed by Sam Weinig.

Unify globalData APIs
https://bugs.webkit.org/show_bug.cgi?id=47969

Adapt code to JSGlobalObject::globalData returning a reference
instead of a pointer.

  • WebProcess/Plugins/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): (WebKit::NPRuntimeObjectMap::evaluate):

WebKit/mac:

2010-10-23 Xan Lopez <[email protected]>

Reviewed by Sam Weinig.

Unify globalData APIs
https://bugs.webkit.org/show_bug.cgi?id=47969

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::evaluate): (WebKit::NetscapePluginInstanceProxy::invoke): (WebKit::NetscapePluginInstanceProxy::invokeDefault): (WebKit::NetscapePluginInstanceProxy::construct):
  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame evaluateWebScript:]):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSGlobalObject.cpp

    r69516 r70406  
    117117        (*it)->clearGlobalObject();
    118118       
    119     RegisterFile& registerFile = globalData()->interpreter->registerFile();
     119    RegisterFile& registerFile = globalData().interpreter->registerFile();
    120120    if (registerFile.clearGlobalObject(this))
    121121        registerFile.setNumGlobals(0);
     
    350350        (*it)->markAggregate(markStack);
    351351
    352     RegisterFile& registerFile = globalData()->interpreter->registerFile();
     352    RegisterFile& registerFile = globalData().interpreter->registerFile();
    353353    if (registerFile.globalObject() == this)
    354         registerFile.markGlobals(markStack, &globalData()->heap);
     354        registerFile.markGlobals(markStack, &globalData().heap);
    355355
    356356    markIfNeeded(markStack, d()->regExpConstructor);
Note: See TracChangeset for help on using the changeset viewer.