1. 19 Feb, 2011 1 commit
    • barraclough@apple.com's avatar
      Bug 54786 - Devirtualize JSCell::classInfo() · a5540da1
      barraclough@apple.com authored
      Reviewed by Sam Weinig.
      
      Instead of making a virtual function call, add a pointer to the ClassInfo
      onto Structure.
      
      This removes a virtual function call, and paves the way towards removing all
      the createStructure methods, and StructureFlags/AnonymousSlotCount properties
      (these should be able to move onto ClassInfo).
      
      Calls to Structure::create must now pass a pointer to the ClassInfo for the
      structure. All objects now have a ClassInfo pointer, non-object cell types
      still do not.
      
      Changes are most mechanical, involving three steps:
          * Remove virtual classInfo() methods.
          * Add &s_info parameter to calls to Structure::create.
          * Rename ClassInfo static members on classes from 'info' to 's_info',
            for consistency.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackConstructor.cpp:
      * API/JSCallbackConstructor.h:
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackFunction.h:
      * API/JSCallbackObject.cpp:
      * API/JSCallbackObject.h:
      * API/JSCallbackObjectFunctions.h:
      * API/JSObjectRef.cpp:
      * API/JSValueRef.cpp:
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.exp:
      * debugger/Debugger.cpp:
      * debugger/DebuggerActivation.h:
      * debugger/DebuggerCallFrame.cpp:
      * interpreter/Interpreter.cpp:
      * jit/JITCall32_64.cpp:
      * jit/JITOpcodes.cpp:
      * jit/JITStubs.cpp:
      * profiler/Profiler.cpp:
      * runtime/Arguments.cpp:
      * runtime/Arguments.h:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayPrototype.cpp:
      * runtime/ArrayPrototype.h:
      * runtime/BooleanObject.cpp:
      * runtime/BooleanObject.h:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/DateInstance.cpp:
      * runtime/DateInstance.h:
      * runtime/DatePrototype.cpp:
      * runtime/DatePrototype.h:
      * runtime/ErrorInstance.cpp:
      * runtime/ErrorInstance.h:
      * runtime/ErrorPrototype.cpp:
      * runtime/FunctionPrototype.cpp:
      * runtime/FunctionPrototype.h:
      * runtime/GetterSetter.h:
      * runtime/GlobalEvalFunction.h:
      * runtime/InternalFunction.cpp:
      * runtime/InternalFunction.h:
      * runtime/JSAPIValueWrapper.h:
      * runtime/JSActivation.cpp:
      * runtime/JSActivation.h:
      * runtime/JSArray.cpp:
      * runtime/JSArray.h:
      * runtime/JSByteArray.cpp:
      * runtime/JSByteArray.h:
      * runtime/JSCell.cpp:
      * runtime/JSCell.h:
      * runtime/JSFunction.cpp:
      * runtime/JSFunction.h:
      * runtime/JSGlobalData.cpp:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/JSNotAnObject.h:
      * runtime/JSONObject.cpp:
      * runtime/JSONObject.h:
      * runtime/JSObject.cpp:
      * runtime/JSObject.h:
      * runtime/JSObjectWithGlobalObject.h:
      * runtime/JSPropertyNameIterator.h:
      * runtime/JSStaticScopeObject.h:
      * runtime/JSString.h:
      * runtime/JSVariableObject.h:
      * runtime/JSWrapperObject.h:
      * runtime/JSZombie.cpp:
      * runtime/JSZombie.h:
      * runtime/Lookup.cpp:
      * runtime/MathObject.cpp:
      * runtime/MathObject.h:
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorConstructor.h:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberConstructor.h:
      * runtime/NumberObject.cpp:
      * runtime/NumberObject.h:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpConstructor.h:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpObject.h:
      * runtime/RegExpPrototype.cpp:
      * runtime/ScopeChain.cpp:
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp:
      * runtime/StringObject.h:
      * runtime/StringObjectThatMasqueradesAsUndefined.h:
      * runtime/StringPrototype.cpp:
      * runtime/StringPrototype.h:
      * runtime/Structure.cpp:
      * runtime/Structure.h:
      
      Source/JavaScriptGlue: 
      
      * JSUtils.cpp:
      (KJSValueToJSObject):
      (KJSValueToCFTypeInternal):
      * UserObjectImp.cpp:
      * UserObjectImp.h:
      (UserObjectImp::createStructure):
      
      Source/WebCore: 
      
      * WebCore.exp.in:
      * bindings/js/JSAudioConstructor.cpp:
      * bindings/js/JSAudioConstructor.h:
      * bindings/js/JSDOMBinding.cpp:
      * bindings/js/JSDOMBinding.h:
      * bindings/js/JSDOMGlobalObject.cpp:
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp:
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSDOMWindowShell.cpp:
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSGeolocationCustom.cpp:
      * bindings/js/JSImageConstructor.cpp:
      * bindings/js/JSImageConstructor.h:
      * bindings/js/JSImageDataCustom.cpp:
      * bindings/js/JSOptionConstructor.cpp:
      * bindings/js/JSOptionConstructor.h:
      * bindings/js/JSWorkerContextBase.cpp:
      * bindings/js/JSWorkerContextBase.h:
      * bindings/js/SerializedScriptValue.cpp:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/c/CRuntimeObject.cpp:
      * bridge/c/CRuntimeObject.h:
      * bridge/c/c_instance.cpp:
      * bridge/jni/jsc/JNIUtilityPrivate.cpp:
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.cpp:
      * bridge/jni/jsc/JavaRuntimeObject.h:
      * bridge/jsc/BridgeJSC.cpp:
      * bridge/objc/ObjCRuntimeObject.h:
      * bridge/objc/ObjCRuntimeObject.mm:
      * bridge/objc/objc_instance.mm:
      * bridge/objc/objc_runtime.h:
      * bridge/objc/objc_runtime.mm:
      * bridge/runtime_array.cpp:
      * bridge/runtime_array.h:
      * bridge/runtime_method.cpp:
      * bridge/runtime_method.h:
      * bridge/runtime_object.cpp:
      * bridge/runtime_object.h:
      
      Source/WebKit/mac: 
      
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
      (WebKit::ProxyRuntimeMethod::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.h:
      (WebKit::ProxyRuntimeObject::createStructure):
      * Plugins/Hosted/ProxyRuntimeObject.mm:
      (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      * WebView/WebView.mm:
      (aeDescFromJSValue):
      
      Source/WebKit2: 
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
      (WebKit::JSNPMethod::JSNPMethod):
      * WebProcess/Plugins/Netscape/JSNPMethod.h:
      (WebKit::JSNPMethod::createStructure):
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::JSNPObject):
      * WebProcess/Plugins/Netscape/JSNPObject.h:
      (WebKit::JSNPObject::createStructure):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5540da1
  2. 01 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  3. 17 Jun, 2010 1 commit
    • darin@apple.com's avatar
      2010-06-17 Darin Adler <darin@apple.com> · b54de419
      darin@apple.com authored
              Reviewed by Sam Weinig.
      
              Use adoptRef and create functions in more code paths
              https://bugs.webkit.org/show_bug.cgi?id=40760
      
              * API/JSClassRef.h: Removed unneeded include of RefCounted.h.
              * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
      
              * bytecode/CodeBlock.h:
              (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
              SharedSymbolTable::create function instead of calling new directly.
      
              * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
              class and made the constructor private.
      2010-06-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              Use adoptRef and create functions in more code paths
              https://bugs.webkit.org/show_bug.cgi?id=40760
      
              * Plugins/Hosted/NetscapePluginInstanceProxy.h: Made create no longer
              be an inline function.
      
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
              Moved the call to addPluginInstance out of here.
              (WebKit::NetscapePluginInstanceProxy::create): Move it in here.
              This makes sure we call adoptRef on the new proxy before any caller
              calls ref on it.
      2010-06-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              Use adoptRef and create functions in more code paths
              https://bugs.webkit.org/show_bug.cgi?id=40760
      
              This helps prepare for an assertion that fires if you ref or destroy an
              object before calling adoptRef on it. That will help us catch mistakes
              that can lead to storage leaks.
      
              * WebCore.base.exp: Updated export now that Frame::create is not an
              inline function.
      
              * css/CSSInitialValue.h:
              (WebCore::CSSInitialValue::createExplicit): Use create.
              (WebCore::CSSInitialValue::createImplicit): Ditto.
              (WebCore::CSSInitialValue::create): Added.
      
              * css/CSSPrimitiveValue.cpp:
              (WebCore::CSSPrimitiveValue::createUncachedIdentifier): Added.
              (WebCore::CSSPrimitiveValue::createUncachedColor): Added.
              (WebCore::CSSPrimitiveValue::createUncached): Added.
              (WebCore::CSSPrimitiveValue::createIdentifier): Use createUncachedIdentifier
              instead of using new directly.
              (WebCore::CSSPrimitiveValue::createColor): Use createUncachedColor instead
              of using new directly.
              (WebCore::CSSPrimitiveValue::create): Use createdUncached instead of using
              new directly.
              * css/CSSPrimitiveValue.h: Declare the new functions above.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::loadFullDefaultStyle): Deref simpleDefaultStyleSheet instead of
              explicitly deleting it.
      
              * loader/SubresourceLoader.cpp:
              (WebCore::SubresourceLoader::SubresourceLoader): Move the call to
              addSubresourceLoader out of here.
              (WebCore::SubresourceLoader::create): Move it in here. This makes it so
              we don't ref the loader before finishing its creation and calling adoptRef.
      
              * page/Frame.cpp:
              (WebCore::Frame::Frame): Move the call to setMainFrame out of here.
              Also refactor the code so an assertion is easier to read.
              (WebCore::Frame::create): Move the call to setMainFrame in here.
              This makes it so we don't ref the frame before finishing its creation
              and calling adoptRef.
              * page/Frame.h: Made the create function non-inline.
      
              * platform/text/BidiContext.cpp:
              (WebCore::BidiContext::createUncached): Added.
              (WebCore::BidiContext::create): Call createUncached instead of callling
              new directly.
              * platform/text/BidiContext.h: Declare createUncached.
      
              * rendering/RenderSVGResourceFilter.cpp:
              (WebCore::RenderSVGResourceFilter::buildPrimitives): Use PassRefPtr and
              RefPtr instead of OwnPtr. And use the create function instead of new.
              * rendering/RenderSVGResourceFilter.h: Ditto.
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::writeSVGResourceContainer): Ditto.
      
              * storage/StorageAreaImpl.cpp:
              (WebCore::StorageAreaImpl::StorageAreaImpl): Move the code that calls
              StorageAreaSync::create out of here.
              (WebCore::StorageAreaImpl::create): Move it in here. This makes it so we
              don't ref the storage area before finishing its creation and calling adoptRef.
      
              * svg/SVGPaint.cpp:
              (WebCore::SVGPaint::defaultFill): Use create instead of new.
              (WebCore::SVGPaint::defaultStroke): Ditto.
      
              * svg/graphics/filters/SVGFilterBuilder.h: Made the constructor private
              and added a create function since this is a reference counted object and
              should not be constructed directly.
      2010-06-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              Use adoptRef and create functions in more code paths
              https://bugs.webkit.org/show_bug.cgi?id=40760
      
              * DumpRenderTree/DumpRenderTree.h: Change gLayoutTestController to a RefPtr.
      
              * DumpRenderTree/LayoutTestController.cpp:
              (LayoutTestController::create): Added.
              * DumpRenderTree/LayoutTestController.h: Declare the create function.
      
              * DumpRenderTree/chromium/TestShell.cpp:
              (TestShell::TestShell): Use create instead of new.
              * DumpRenderTree/chromium/TestShell.h: Use RefPtr instead of OwnPtr.
      
              * DumpRenderTree/gtk/DumpRenderTree.cpp:
              (runTest): Use RefPtr and create instead of OwnPtr and new.
      
              * DumpRenderTree/mac/DumpRenderTree.mm:
              (runTest): Use RefPtr and create instead of OwnPtr and new.
      
              * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
              (WebCore::DumpRenderTree::DumpRenderTree): Use create and releaseRef
              instead of new.
      
              * DumpRenderTree/win/DumpRenderTree.cpp:
              (runTest): Use RefPtr and create instead of OwnPtr and new.
      
              * DumpRenderTree/wx/DumpRenderTreeWx.cpp:
              (runTest): Use RefPtr and create instead of OwnPtr and new.
              (MyApp::OnInit): Removed unneeded code to delete the layout
              test controller. This is done during each test.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b54de419
  4. 21 May, 2010 1 commit
    • oliver@apple.com's avatar
      2010-05-21 Oliver Hunt <oliver@apple.com> · 5dea615d
      oliver@apple.com authored
              Reviewed by Geoffrey Garen.
      
              All callable objects should have a global object reference
              https://bugs.webkit.org/show_bug.cgi?id=39495
      
              All objects that may ever return a value other CallTypeNone
              or ConstructTypeNone now get a global object in their constructor
              and store that in their first anonymous slot.  We add a new type
              JSObjectWithGlobalObject to allow us to share this logic as much
              as possible, however some objects have specific inheritance
              requirements so we can't just use it universally.
      
              To enforce this requirement JSValue::getCallData and getConstructData
              make use of a new "isValidCallee" function to assert that any object
              that returns a value other than CallType/ConstructTypeNone has a
              global object in anonymous slot 0.
      
              In order to ensure that static function slots are converted into
              function objects with the correct global object, all prototype objects
              and other classes with static function slots also gain a global object
              reference.  Happily this fixes the long standing issue where host
              function objects get a prototype from the lexical global object of the
              first function that calls them, instead of the global object that they
              are defined on.
      
              * API/JSCallbackConstructor.cpp:
              (JSC::JSCallbackConstructor::JSCallbackConstructor):
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              (JSC::JSCallbackFunction::JSCallbackFunction):
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.cpp:
              (JSC::):
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              (JSC::::JSCallbackObject):
              (JSC::::staticFunctionGetter):
              * API/JSClassRef.cpp:
              (OpaqueJSClass::prototype):
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              (JSObjectMake):
              (JSObjectMakeFunctionWithCallback):
              (JSObjectMakeConstructor):
              (JSObjectGetPrivate):
              (JSObjectSetPrivate):
              (JSObjectGetPrivateProperty):
              (JSObjectSetPrivateProperty):
              (JSObjectDeletePrivateProperty):
              * API/JSValueRef.cpp:
              (JSValueIsObjectOfClass):
              * API/JSWeakObjectMapRefPrivate.cpp:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * JavaScriptCore.exp:
              * JavaScriptCore.gypi:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * interpreter/Interpreter.cpp:
              (JSC::Interpreter::privateExecute):
              * jit/JITStubs.cpp:
              (JSC::DEFINE_STUB_FUNCTION):
              * jsc.cpp:
              (GlobalObject::GlobalObject):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              * runtime/ArrayConstructor.h:
              * runtime/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::ArrayPrototype):
              * runtime/ArrayPrototype.h:
              (JSC::ArrayPrototype::createStructure):
              * runtime/BooleanConstructor.cpp:
              (JSC::BooleanConstructor::BooleanConstructor):
              * runtime/BooleanConstructor.h:
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/BooleanPrototype.h:
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateConstructor.h:
              * runtime/DatePrototype.cpp:
              (JSC::DatePrototype::DatePrototype):
              * runtime/DatePrototype.h:
              * runtime/ErrorConstructor.cpp:
              (JSC::ErrorConstructor::ErrorConstructor):
              * runtime/ErrorConstructor.h:
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/ErrorPrototype.h:
              * runtime/FunctionConstructor.cpp:
              (JSC::FunctionConstructor::FunctionConstructor):
              * runtime/FunctionConstructor.h:
              * runtime/FunctionPrototype.cpp:
              (JSC::FunctionPrototype::FunctionPrototype):
              (JSC::FunctionPrototype::addFunctionProperties):
              * runtime/FunctionPrototype.h:
              * runtime/GlobalEvalFunction.cpp:
              (JSC::GlobalEvalFunction::GlobalEvalFunction):
              * runtime/GlobalEvalFunction.h:
              * runtime/InternalFunction.cpp:
              (JSC::InternalFunction::InternalFunction):
              * runtime/InternalFunction.h:
              * runtime/JSCell.h:
              (JSC::JSValue::getCallData):
              (JSC::JSValue::getConstructData):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              * runtime/JSFunction.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::JSGlobalObject):
              * runtime/JSONObject.cpp:
              (JSC::JSONObject::JSONObject):
              * runtime/JSONObject.h:
              * runtime/JSObject.h:
              * runtime/JSObjectWithGlobalObject.cpp: Added.
              (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
              * runtime/JSObjectWithGlobalObject.h: Added.
              (JSC::JSObjectWithGlobalObject::createStructure):
              (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
              * runtime/JSValue.cpp:
              (JSC::JSValue::isValidCallee):
              * runtime/JSValue.h:
              * runtime/Lookup.cpp:
              (JSC::setUpStaticFunctionSlot):
              * runtime/MathObject.cpp:
              (JSC::MathObject::MathObject):
              * runtime/MathObject.h:
              * runtime/NativeErrorConstructor.cpp:
              (JSC::NativeErrorConstructor::NativeErrorConstructor):
              * runtime/NativeErrorConstructor.h:
              * runtime/NativeErrorPrototype.cpp:
              (JSC::NativeErrorPrototype::NativeErrorPrototype):
              * runtime/NativeErrorPrototype.h:
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::NumberConstructor):
              * runtime/NumberConstructor.h:
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/NumberPrototype.h:
              * runtime/ObjectConstructor.cpp:
              (JSC::ObjectConstructor::ObjectConstructor):
              * runtime/ObjectConstructor.h:
              * runtime/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              * runtime/ObjectPrototype.h:
              * runtime/PrototypeFunction.cpp:
              (JSC::PrototypeFunction::PrototypeFunction):
              * runtime/PrototypeFunction.h:
              * runtime/RegExpConstructor.cpp:
              (JSC::RegExpConstructor::RegExpConstructor):
              (JSC::constructRegExp):
              * runtime/RegExpConstructor.h:
              * runtime/RegExpObject.cpp:
              (JSC::RegExpObject::RegExpObject):
              * runtime/RegExpObject.h:
              * runtime/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              * runtime/RegExpPrototype.h:
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringConstructor.h:
              * runtime/StringPrototype.cpp:
              (JSC::StringPrototype::StringPrototype):
              * runtime/StringPrototype.h:
      2010-05-21  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              All callable objects should have a global object reference
              https://bugs.webkit.org/show_bug.cgi?id=39495
      
              Update expected results as we now give all function objects
              get their prototypes from the correct global object.
      
              * fast/dom/prototype-inheritance-expected.txt:
      2010-05-21  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              All callable objects should have a global object reference
              https://bugs.webkit.org/show_bug.cgi?id=39495
      
              Update the bindings generator to give prototype objects a
              global object.  Update all the manually written JSObject
              subclasses to pass a global object.
      
              * ForwardingHeaders/runtime/JSObjectWithGlobalObject.h: Added.
              * WebCore.PluginHostProcess.exp:
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::objectToStringFunctionGetter):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::nonCachingStaticFunctionGetter):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::setWindow):
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::nonCachingStaticBackFunctionGetter):
              (WebCore::nonCachingStaticForwardFunctionGetter):
              (WebCore::nonCachingStaticGoFunctionGetter):
              * bindings/js/JSLocationCustom.cpp:
              (WebCore::nonCachingStaticReplaceFunctionGetter):
              (WebCore::nonCachingStaticReloadFunctionGetter):
              (WebCore::nonCachingStaticAssignFunctionGetter):
              * bindings/js/WorkerScriptController.cpp:
              (WebCore::WorkerScriptController::initScript):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/CRuntimeObject.cpp:
              (JSC::Bindings::CRuntimeObject::CRuntimeObject):
              * bridge/c/CRuntimeObject.h:
              * bridge/c/c_instance.cpp:
              (JSC::Bindings::CInstance::newRuntimeObject):
              (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
              (JSC::Bindings::CInstance::getMethod):
              * bridge/jni/jsc/JavaInstanceJSC.cpp:
              (JavaInstance::newRuntimeObject):
              (JavaRuntimeMethod::JavaRuntimeMethod):
              (JavaInstance::getMethod):
              * bridge/jni/jsc/JavaRuntimeObject.cpp:
              (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
              * bridge/jni/jsc/JavaRuntimeObject.h:
              * bridge/jsc/BridgeJSC.cpp:
              (JSC::Bindings::Instance::newRuntimeObject):
              * bridge/objc/ObjCRuntimeObject.h:
              * bridge/objc/ObjCRuntimeObject.mm:
              (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
              * bridge/objc/objc_class.mm:
              (JSC::Bindings::ObjcClass::fallbackObject):
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::newRuntimeObject):
              (ObjCRuntimeMethod::ObjCRuntimeMethod):
              (ObjcInstance::getMethod):
              * bridge/objc/objc_runtime.h:
              * bridge/objc/objc_runtime.mm:
              (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
              * bridge/runtime_method.cpp:
              (JSC::RuntimeMethod::RuntimeMethod):
              * bridge/runtime_method.h:
              * bridge/runtime_object.cpp:
              (JSC::Bindings::RuntimeObject::RuntimeObject):
              * bridge/runtime_object.h:
      2010-05-21  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Geoffrey Garen.
      
              All callable objects should have a global object reference
              https://bugs.webkit.org/show_bug.cgi?id=39495
      
              Update the plugin proxy to handle the need for global object.
      
              * Plugins/Hosted/ProxyInstance.mm:
              (WebKit::ProxyInstance::newRuntimeObject):
              (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
              (WebKit::ProxyInstance::getMethod):
              * Plugins/Hosted/ProxyRuntimeObject.h:
              * Plugins/Hosted/ProxyRuntimeObject.mm:
              (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5dea615d
  5. 22 Apr, 2010 1 commit
  6. 05 Apr, 2010 1 commit
    • oliver@apple.com's avatar
      2010-04-05 Oliver Hunt <oliver@apple.com> · 8da6ae83
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Support weak maps in JSC
              https://bugs.webkit.org/show_bug.cgi?id=37132
      
              Expose an API to allow creation of a map for storing
              weak JS references.
      
              * API/JSWeakObjectMapRefInternal.h: Added.
              (OpaqueJSWeakObjectMap::create):
              (OpaqueJSWeakObjectMap::map):
              (OpaqueJSWeakObjectMap::~OpaqueJSWeakObjectMap):
              (OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap):
              * API/JSWeakObjectMapRefPrivate.cpp: Added.
              * API/JSWeakObjectMapRefPrivate.h: Added.
              * JavaScriptCore.exp:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::registerWeakMap):
              (JSC::JSGlobalObject::deregisterWeakMap):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8da6ae83