[V8] Use a v8::Object rather than a v8::Context to represent the creationContext
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Sep 2012 01:17:53 +0000 (01:17 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Sep 2012 01:17:53 +0000 (01:17 +0000)
commit8740dab8d39e04bb04304f0fb2836272cf0b5405
tree99de116f6ce733ef76b2b871332cd54e8112a77f
parent350f5c19367cb02217f8c22516712f478ade1232
[V8] Use a v8::Object rather than a v8::Context to represent the creationContext
https://bugs.webkit.org/show_bug.cgi?id=96154

Patch by Adam Barth <abarth@chromium.org> on 2012-09-07
Reviewed by Eric Seidel.

This patch is a mechanical search-and-replace. Using a v8::Object
rather than a v8::Context lets us delay the call to CreationContext()
until we actually need to call it. This should not affect behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateNormalAttrGetter):
(GenerateNamedConstructorCallback):
(GenerateImplementation):
(GenerateToV8Converters):
(GenerateFunctionCallString):
(NativeToJSValue):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::Float64ArrayV8Internal::fooCallback):
(WebCore::toV8):
(WebCore::V8Float64Array::wrapSlow):
* bindings/scripts/test/V8/V8Float64Array.h:
(V8Float64Array):
(WebCore::V8Float64Array::wrap):
(WebCore):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::wrapSlow):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(V8TestActiveDOMObject):
(WebCore::V8TestActiveDOMObject::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestCallback.cpp:
(WebCore::V8TestCallback::callbackWithClass1Param):
(WebCore::V8TestCallback::callbackWithClass2Param):
(WebCore::V8TestCallback::callbackWithStringList):
(WebCore::V8TestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::wrapSlow):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(V8TestCustomNamedGetter):
(WebCore::V8TestCustomNamedGetter::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(V8TestEventConstructor):
(WebCore::V8TestEventConstructor::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::TestEventTargetV8Internal::itemCallback):
(WebCore::V8TestEventTarget::wrapSlow):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(V8TestEventTarget):
(WebCore::V8TestEventTarget::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore::V8TestException::wrapSlow):
* bindings/scripts/test/V8/V8TestException.h:
(V8TestException):
(WebCore::V8TestException::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::TestInterfaceV8Internal::supplementalNodeAttrGetter):
(WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
(WebCore::V8TestInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestInterface.h:
(V8TestInterface):
(WebCore::V8TestInterface::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::wrapSlow):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(V8TestMediaQueryListListener):
(WebCore::V8TestMediaQueryListListener::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructorConstructorCallback):
(WebCore::V8TestNamedConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(V8TestNamedConstructor):
(WebCore::V8TestNamedConstructor::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::wrapSlow):
* bindings/scripts/test/V8/V8TestNode.h:
(V8TestNode):
(WebCore::V8TestNode::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
(WebCore::TestObjV8Internal::testObjAttrAttrGetter):
(WebCore::TestObjV8Internal::XMLObjAttrAttrGetter):
(WebCore::TestObjV8Internal::typedArrayAttrAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
(WebCore::TestObjV8Internal::cachedAttribute1AttrGetter):
(WebCore::TestObjV8Internal::cachedAttribute2AttrGetter):
(WebCore::TestObjV8Internal::contentDocumentAttrGetter):
(WebCore::TestObjV8Internal::mutablePointAttrGetter):
(WebCore::TestObjV8Internal::immutablePointAttrGetter):
(WebCore::TestObjV8Internal::objMethodCallback):
(WebCore::TestObjV8Internal::objMethodWithArgsCallback):
(WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
(WebCore::TestObjV8Internal::withScriptStateObjCallback):
(WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
(WebCore::TestObjV8Internal::getSVGDocumentCallback):
(WebCore::TestObjV8Internal::mutablePointFunctionCallback):
(WebCore::TestObjV8Internal::immutablePointFunctionCallback):
(WebCore::TestObjV8Internal::strictFunctionCallback):
(WebCore::V8TestObj::wrapSlow):
* bindings/scripts/test/V8/V8TestObj.h:
(V8TestObj):
(WebCore::V8TestObj::wrap):
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::TestSerializedScriptValueInterfaceV8Internal::portsAttrGetter):
(WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(V8TestSerializedScriptValueInterface):
(WebCore::V8TestSerializedScriptValueInterface::wrap):
(WebCore::toV8):
* bindings/v8/DOMTransaction.cpp:
(WebCore::DOMTransaction::callFunction):
* bindings/v8/IDBCustomBindings.cpp:
(WebCore::V8IDBCursorWithValue::valueAccessorGetter):
* bindings/v8/SerializedScriptValue.cpp:
* bindings/v8/V8Binding.h:
(WebCore::V8ValueTraits::arrayV8Value):
* bindings/v8/V8Collection.h:
(WebCore::getV8Object):
(WebCore::getNamedPropertyOfCollection):
(WebCore::collectionNamedPropertyGetter):
(WebCore::getIndexedPropertyOfCollection):
(WebCore::collectionIndexedPropertyGetter):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::getter):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::convertEventTargetToV8Object):
* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::convertEventTargetToV8Object):
(V8DOMWrapper):
* bindings/v8/V8ThrowException.cpp:
(WebCore):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::toV8):
(WebCore::V8Blob::constructorCallback):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSValueCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
(WebCore::toV8Object):
(WebCore::V8CanvasRenderingContext2D::strokeStyleAccessorGetter):
(WebCore::V8CanvasRenderingContext2D::fillStyleAccessorGetter):
* bindings/v8/custom/V8ConsoleCustom.cpp:
(WebCore::V8Console::memoryAccessorGetter):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::openCallback):
(WebCore::V8DOMWindow::indexedPropertyGetter):
(WebCore::V8DOMWindow::namedPropertyGetter):
(WebCore::toV8):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::V8Document::evaluateCallback):
(WebCore::V8Document::getCSSCanvasContextCallback):
(WebCore::toV8):
(WebCore::V8Document::createTouchListCallback):
* bindings/v8/custom/V8DocumentLocationCustom.cpp:
(WebCore::V8Document::locationAccessorGetter):
* bindings/v8/custom/V8EntryCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EntrySyncCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::V8Event::dataTransferAccessorGetter):
(WebCore::V8Event::clipboardDataAccessorGetter):
(WebCore::toV8):
* bindings/v8/custom/V8FileReaderCustom.cpp:
(WebCore::V8FileReader::resultAccessorGetter):
* bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
(WebCore::getNamedItems):
(WebCore::getItem):
(WebCore::V8HTMLAllCollection::namedPropertyGetter):
(WebCore::V8HTMLAllCollection::itemCallback):
(WebCore::V8HTMLAllCollection::namedItemCallback):
(WebCore::V8HTMLAllCollection::callAsFunctionCallback):
* bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
(WebCore::V8HTMLCanvasElement::getContextCallback):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::getNamedItems):
(WebCore::V8HTMLCollection::namedPropertyGetter):
(WebCore::V8HTMLCollection::namedItemCallback):
(WebCore::toV8):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::getNamedProperty):
(WebCore::V8HTMLDocument::allAccessorGetter):
(WebCore::toV8):
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore::toV8):
(WebCore::V8HTMLElement::itemValueAccessorGetter):
* bindings/v8/custom/V8HTMLFormElementCustom.cpp:
(WebCore::V8HTMLFormElement::indexedPropertyGetter):
(WebCore::V8HTMLFormElement::namedPropertyGetter):
* bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
(WebCore::V8HTMLFrameSetElement::namedPropertyGetter):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback):
* bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
(WebCore::V8HTMLLinkElement::sizesAccessorGetter):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::indexedPropertyGetter):
* bindings/v8/custom/V8HTMLOutputElementCustom.cpp:
(WebCore::V8HTMLOutputElement::htmlForAccessorGetter):
* bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
(WebCore::V8HTMLSelectElement::indexedPropertyGetter):
* bindings/v8/custom/V8IDBAnyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8IDBKeyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ImageDataCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8MessageChannelConstructor.cpp:
(WebCore::V8MessageChannel::constructorCallback):
* bindings/v8/custom/V8MessageEventCustom.cpp:
(WebCore::V8MessageEvent::dataAccessorGetter):
(WebCore::V8MessageEvent::portsAccessorGetter):
* bindings/v8/custom/V8MicroDataItemValueCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::V8NamedNodeMap::indexedPropertyGetter):
(WebCore::V8NamedNodeMap::namedPropertyGetter):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::toV8Slow):
* bindings/v8/custom/V8NodeListCustom.cpp:
(WebCore::V8NodeList::namedPropertyGetter):
* bindings/v8/custom/V8NotificationCenterCustom.cpp:
(WebCore::V8NotificationCenter::createHTMLNotificationCallback):
(WebCore::V8NotificationCenter::createNotificationCallback):
* bindings/v8/custom/V8PerformanceCustom.cpp:
(WebCore::V8Performance::memoryAccessorGetter):
* bindings/v8/custom/V8PerformanceEntryCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8PopStateEventCustom.cpp:
(WebCore::V8PopStateEvent::stateAccessorGetter):
* bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
(WebCore::V8SQLTransactionSync::executeSqlCallback):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGElementCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGPathSegCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8StyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8StyleSheetListCustom.cpp:
(WebCore::V8StyleSheetList::namedPropertyGetter):
* bindings/v8/custom/V8TrackEventCustom.cpp:
(WebCore::V8TrackEvent::trackAccessorGetter):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
(WebCore::getObjectParameter):
(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
(WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
(WebCore::V8WebGLRenderingContext::getParameterCallback):
(WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
(WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
(WebCore::V8WebGLRenderingContext::getUniformCallback):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::responseAccessorGetter):
* dom/make_names.pl:
(printWrapperFunctions):
(printWrapperFactoryCppFile):
(printWrapperFactoryHeaderFile):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
88 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h
Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h
Source/WebCore/bindings/scripts/test/V8/V8TestCallback.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h
Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h
Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h
Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestException.h
Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestInterface.h
Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h
Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h
Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestNode.h
Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestObj.h
Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h
Source/WebCore/bindings/v8/DOMTransaction.cpp
Source/WebCore/bindings/v8/IDBCustomBindings.cpp
Source/WebCore/bindings/v8/SerializedScriptValue.cpp
Source/WebCore/bindings/v8/V8Binding.h
Source/WebCore/bindings/v8/V8Collection.h
Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
Source/WebCore/bindings/v8/V8DOMWrapper.cpp
Source/WebCore/bindings/v8/V8DOMWrapper.h
Source/WebCore/bindings/v8/V8ThrowException.cpp
Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp
Source/WebCore/bindings/v8/custom/V8CSSRuleCustom.cpp
Source/WebCore/bindings/v8/custom/V8CSSValueCustom.cpp
Source/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp
Source/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp
Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp
Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
Source/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp
Source/WebCore/bindings/v8/custom/V8EntryCustom.cpp
Source/WebCore/bindings/v8/custom/V8EntrySyncCustom.cpp
Source/WebCore/bindings/v8/custom/V8EventCustom.cpp
Source/WebCore/bindings/v8/custom/V8FileReaderCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLFormElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
Source/WebCore/bindings/v8/custom/V8HTMLLinkElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLOutputElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp
Source/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp
Source/WebCore/bindings/v8/custom/V8ImageDataCustom.cpp
Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp
Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp
Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
Source/WebCore/bindings/v8/custom/V8MicroDataItemValueCustom.cpp
Source/WebCore/bindings/v8/custom/V8NamedNodeMapCustom.cpp
Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp
Source/WebCore/bindings/v8/custom/V8NodeListCustom.cpp
Source/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp
Source/WebCore/bindings/v8/custom/V8PerformanceCustom.cpp
Source/WebCore/bindings/v8/custom/V8PerformanceEntryCustom.cpp
Source/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
Source/WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp
Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp
Source/WebCore/bindings/v8/custom/V8SVGElementCustom.cpp
Source/WebCore/bindings/v8/custom/V8SVGPathSegCustom.cpp
Source/WebCore/bindings/v8/custom/V8ScriptProfileCustom.cpp
Source/WebCore/bindings/v8/custom/V8ScriptProfileNodeCustom.cpp
Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp
Source/WebCore/bindings/v8/custom/V8StyleSheetListCustom.cpp
Source/WebCore/bindings/v8/custom/V8TrackEventCustom.cpp
Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
Source/WebCore/dom/make_names.pl