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/FunctionConstructor.cpp

    r69663 r70406  
    9898
    9999    JSGlobalObject* globalObject = exec->lexicalGlobalObject();
    100     JSGlobalData* globalData = globalObject->globalData();
     100    JSGlobalData& globalData = globalObject->globalData();
    101101    SourceCode source = makeSource(program, sourceURL, lineNumber);
    102102    JSObject* exception = 0;
     
    107107    }
    108108
    109     ScopeChain scopeChain(globalObject, globalData, globalObject, exec->globalThisValue());
     109    ScopeChain scopeChain(globalObject, &globalData, globalObject, exec->globalThisValue());
    110110    return new (exec) JSFunction(exec, function, scopeChain.node());
    111111}
Note: See TracChangeset for help on using the changeset viewer.