Ignore:
Timestamp:
Jan 11, 2007, 2:02:14 PM (18 years ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed by Anders Carlsson.

Even more cleanup in preparation for fixing <rdar://problem/4608404>
WebScriptObject's _executionContext lack of ownership policy causes
crashes (e.g., in Dashcode)


Layout tests pass.


Renames:

findRootObjectForNativeHandleFunction => createRootObject
FindRootObjectForNativeHandleFunctionPtr => CreateRootObjectFunction


Also removed unnecessary use of "Bindings::" prefix.

  • JavaScriptCore.exp:
  • bindings/jni/jni_jsobject.cpp: (JavaJSObject::createNative): (JavaJSObject::convertValueToJObject): (JavaJSObject::convertJObjectToValue):
  • bindings/runtime_root.cpp: (KJS::Bindings::RootObject::setCreateRootObject):
  • bindings/runtime_root.h: (KJS::Bindings::RootObject::createRootObject):

WebCore:

Reviewed by Anders Carlsson.


Even more cleanup in preparation for fixing <rdar://problem/4608404>
WebScriptObject's _executionContext lack of ownership policy causes
crashes (e.g., in Dashcode)


Layout tests pass.


Renames:

findRootObjectForNativeHandleFunction => createRootObject
FindRootObjectForNativeHandleFunctionPtr => createRootObjectFunction
rootForView => createRootObject
getInstanceForView => getPluginInstanceForWidget

  • page/mac/FrameMac.mm: (WebCore::FrameMac::getAppletInstanceForWidget): Put the NSView * in a void* variable named "nativeHandle" to be more explicit about the fact that JavaScript's "nativeHandle" is just an NSView *.

(WebCore::getPluginInstanceForWidget): This function now does the NSView *
fetching that its callers used to do.
(WebCore::FrameMac::getEmbedInstanceForWidget): Updated for rename.
(WebCore::FrameMac::getObjectInstanceForWidget): ditto

  • page/mac/WebCoreFrameBridge.mm: Killed the WebCoreBridgeInternal category, which was really more of a shmategory. (createRootObject): Removed rootObjectForView, folding it into its only caller, the similarly named rootForView. Renamed the pair to "createRootObject" because that's what they do.

(-[WebCoreFrameBridge init]): Updated for renames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bindings/runtime_root.cpp

    r18481 r18782  
    261261}
    262262
    263 FindRootObjectForNativeHandleFunctionPtr RootObject::_findRootObjectForNativeHandleFunctionPtr = 0;
     263CreateRootObjectFunction RootObject::_createRootObject = 0;
    264264CFRunLoopRef RootObject::_runLoop = 0;
    265265CFRunLoopSourceRef RootObject::_performJavaScriptSource = 0;
    266266
    267267// Must be called from the thread that will be used to access JavaScript.
    268 void RootObject::setFindRootObjectForNativeHandleFunction(FindRootObjectForNativeHandleFunctionPtr aFunc) {
     268void RootObject::setCreateRootObject(CreateRootObjectFunction createRootObject) {
    269269    // Should only be called once.
    270     assert (_findRootObjectForNativeHandleFunctionPtr == 0);
    271 
    272     _findRootObjectForNativeHandleFunctionPtr = aFunc;
     270    ASSERT(!_createRootObject);
     271
     272    _createRootObject = createRootObject;
    273273   
    274274    // Assume that we can retain this run loop forever.  It'll most
Note: See TracChangeset for help on using the changeset viewer.