[V8] Store main world and non-main world templates separately.
https://bugs.webkit.org/show_bug.cgi?id=111724

Patch by Marja Hölttä <marja@chromium.org> on 2013-03-15
Reviewed by Jochen Eisinger.

This is needed for generating specialized bindings for the main
world (bug 110874).

Source/WebCore:

No new tests (updated existing bindings tests).

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateDomainSafeFunctionGetter):
(GenerateNormalAttrSetter):
(GenerateParametersCheckExpression):
(GenerateParametersCheck):
(GenerateImplementation):
(JSValueToNative):
(CreateCustomSignature):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::Float64ArrayV8Internal::fooMethod):
(WebCore::ConfigureV8Float64ArrayTemplate):
(WebCore::V8Float64Array::GetTemplate):
(WebCore::V8Float64Array::HasInstance):
(WebCore):
(WebCore::V8Float64Array::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8Float64Array.h:
(V8Float64Array):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::TestActiveDOMObjectV8Internal::excitingFunctionMethod):
(WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
(WebCore::ConfigureV8TestActiveDOMObjectTemplate):
(WebCore::V8TestActiveDOMObject::GetTemplate):
(WebCore::V8TestActiveDOMObject::HasInstance):
(WebCore):
(WebCore::V8TestActiveDOMObject::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(V8TestActiveDOMObject):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::GetTemplate):
(WebCore::V8TestCustomNamedGetter::HasInstance):
(WebCore):
(WebCore::V8TestCustomNamedGetter::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(V8TestCustomNamedGetter):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::GetTemplate):
(WebCore::V8TestEventConstructor::HasInstance):
(WebCore):
(WebCore::V8TestEventConstructor::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(V8TestEventConstructor):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::TestEventTargetV8Internal::dispatchEventMethod):
(WebCore::ConfigureV8TestEventTargetTemplate):
(WebCore::V8TestEventTarget::GetTemplate):
(WebCore::V8TestEventTarget::HasInstance):
(WebCore):
(WebCore::V8TestEventTarget::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(V8TestEventTarget):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore::V8TestException::GetTemplate):
(WebCore::V8TestException::HasInstance):
(WebCore):
(WebCore::V8TestException::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestException.h:
(V8TestException):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::TestInterfaceV8Internal::supplementalNodeAttrSetter):
(WebCore::TestInterfaceV8Internal::supplementalMethod2Method):
(WebCore::ConfigureV8TestInterfaceTemplate):
(WebCore::V8TestInterface::GetTemplate):
(WebCore::V8TestInterface::HasInstance):
(WebCore):
(WebCore::V8TestInterface::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestInterface.h:
(V8TestInterface):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::GetTemplate):
(WebCore::V8TestMediaQueryListListener::HasInstance):
(WebCore):
(WebCore::V8TestMediaQueryListListener::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(V8TestMediaQueryListListener):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::GetTemplate):
(WebCore::V8TestNamedConstructor::HasInstance):
(WebCore):
(WebCore::V8TestNamedConstructor::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(V8TestNamedConstructor):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::GetTemplate):
(WebCore::V8TestNode::HasInstance):
(WebCore):
(WebCore::V8TestNode::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestNode.h:
(V8TestNode):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::testObjAttrAttrSetter):
(WebCore::TestObjV8Internal::XMLObjAttrAttrSetter):
(WebCore::TestObjV8Internal::typedArrayAttrAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
(WebCore::TestObjV8Internal::mutablePointAttrSetter):
(WebCore::TestObjV8Internal::immutablePointAttrSetter):
(WebCore::TestObjV8Internal::voidMethodWithArgsMethod):
(WebCore::TestObjV8Internal::longMethodWithArgsMethod):
(WebCore::TestObjV8Internal::objMethodWithArgsMethod):
(WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod):
(WebCore::TestObjV8Internal::overloadedMethod1Method):
(WebCore::TestObjV8Internal::overloadedMethod2Method):
(WebCore::TestObjV8Internal::overloadedMethod8Method):
(WebCore::TestObjV8Internal::overloadedMethodMethod):
(WebCore::TestObjV8Internal::convert1Method):
(WebCore::TestObjV8Internal::convert2Method):
(WebCore::TestObjV8Internal::convert4Method):
(WebCore::TestObjV8Internal::convert5Method):
(WebCore::TestObjV8Internal::variadicNodeMethodMethod):
(WebCore::ConfigureV8TestObjTemplate):
(WebCore::V8TestObj::GetTemplate):
(WebCore::V8TestObj::HasInstance):
(WebCore):
(WebCore::V8TestObj::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestObj.h:
(V8TestObj):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
(WebCore::TestOverloadedConstructorsV8Internal::constructor1):
(WebCore::TestOverloadedConstructorsV8Internal::constructor2):
(WebCore::TestOverloadedConstructorsV8Internal::constructor3):
(WebCore::TestOverloadedConstructorsV8Internal::constructor):
(WebCore::V8TestOverloadedConstructors::GetTemplate):
(WebCore::V8TestOverloadedConstructors::HasInstance):
(WebCore):
(WebCore::V8TestOverloadedConstructors::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
(V8TestOverloadedConstructors):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
(WebCore::V8TestSerializedScriptValueInterface::HasInstance):
(WebCore):
(WebCore::V8TestSerializedScriptValueInterface::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(V8TestSerializedScriptValueInterface):
* bindings/scripts/test/V8/V8TestTypedefs.cpp:
(WebCore::TestTypedefsV8Internal::funcMethod):
(WebCore::ConfigureV8TestTypedefsTemplate):
(WebCore::V8TestTypedefs::GetTemplate):
(WebCore::V8TestTypedefs::HasInstance):
(WebCore):
(WebCore::V8TestTypedefs::HasInstanceInAnyWorld):
* bindings/scripts/test/V8/V8TestTypedefs.h:
(V8TestTypedefs):
* bindings/v8/Dictionary.cpp:
(WebCore::Dictionary::get):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::visitNodeWrappers):
* bindings/v8/SerializedScriptValue.cpp:
* bindings/v8/V8AdaptorFunction.cpp:
(WebCore::V8AdaptorFunction::getTemplate):
* bindings/v8/V8Binding.cpp:
(WebCore::toDOMStringList):
(WebCore::toXPathNSResolver):
* bindings/v8/V8Binding.h:
(WebCore):
(WebCore::toRefPtrNativeArray):
* bindings/v8/V8Collection.cpp:
(WebCore::toOptionsCollectionSetter):
* bindings/v8/V8GCController.cpp:
* bindings/v8/V8NPObject.cpp:
(WebCore::npObjectInvokeImpl):
* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::reportMemoryUsage):
(WebCore::V8PerIsolateData::hasPrivateTemplate):
(WebCore::V8PerIsolateData::privateTemplate):
(WebCore::V8PerIsolateData::rawTemplate):
(WebCore::V8PerIsolateData::hasInstance):
* bindings/v8/V8PerIsolateData.h:
(WebCore::V8PerIsolateData::rawTemplateMap):
(V8PerIsolateData):
(WebCore::V8PerIsolateData::templateMap):
* bindings/v8/V8Utilities.cpp:
(WebCore::extractTransferables):
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::constructWebGLArray):
(WebCore::setWebGLArrayHelper):
* bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
(WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCustom):
* bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
(WebCore::toCanvasStyle):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::setDragImageMethodCustom):
* bindings/v8/custom/V8CryptoCustom.cpp:
(WebCore::V8Crypto::getRandomValuesMethodCustom):
* bindings/v8/custom/V8DOMFormDataCustom.cpp:
(WebCore::V8DOMFormData::constructorCustom):
(WebCore::V8DOMFormData::appendMethodCustom):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::V8DataView::constructorCustom):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::V8Document::evaluateMethodCustom):
* bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
(WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::addMethodCustom):
* bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
(WebCore::removeElement):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::isHTMLAllCollectionMethodCustom):
(WebCore::V8InjectedScriptHost::typeMethodCustom):
(WebCore::V8InjectedScriptHost::getEventListenersMethodCustom):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::V8Location::reloadAttrGetterCustom):
(WebCore::V8Location::replaceAttrGetterCustom):
(WebCore::V8Location::assignAttrGetterCustom):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::V8Node::insertBeforeMethodCustom):
(WebCore::V8Node::replaceChildMethodCustom):
(WebCore::V8Node::removeChildMethodCustom):
(WebCore::V8Node::appendChildMethodCustom):
* bindings/v8/custom/V8NodeListCustom.cpp:
(WebCore::V8NodeList::opaqueRootForGC):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toWebGLUniformLocation):
(WebCore::V8WebGLRenderingContext::getAttachedShadersMethodCustom):
(WebCore::V8WebGLRenderingContext::getProgramParameterMethodCustom):
(WebCore::V8WebGLRenderingContext::getShaderParameterMethodCustom):
(WebCore::V8WebGLRenderingContext::getUniformMethodCustom):
(WebCore::vertexAttribAndUniformHelperf):
(WebCore::uniformHelperi):
(WebCore::uniformMatrixHelper):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::isDocumentType):
(WebCore::V8XMLHttpRequest::sendMethodCustom):

Source/WebKit/chromium:

* src/WebArrayBuffer.cpp:
(WebKit::WebArrayBuffer::createFromV8Value):
* src/WebArrayBufferView.cpp:
(WebKit::WebArrayBufferView::createFromV8Value):
* src/WebBindings.cpp:
(WebKit::getRangeImpl):
(WebKit::getNodeImpl):
(WebKit::getElementImpl):
(WebKit::getArrayBufferImpl):
(WebKit::getArrayBufferViewImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145906 268f45cc-cd09-0410-ab3c-d52691b4dbfc