Changeset 109611 in webkit
- Timestamp:
- Mar 2, 2012 1:45:10 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109610 r109611 1 2012-03-02 Erik Arvidsson <arv@chromium.org> 2 3 [V8] Bindings for node always check if they are a Document. 4 https://bugs.webkit.org/show_bug.cgi?id=79947 5 6 Reviewed by Adam Barth. 7 8 This changes the generated bindings code to only generate the Document code for the Document wrappers. 9 10 No new tests. Covered by existing tests. 11 12 * bindings/scripts/CodeGeneratorV8.pm: 13 (GenerateToV8Converters): 14 * bindings/scripts/test/V8/V8Float64Array.cpp: 15 (WebCore::V8Float64Array::wrapSlow): 16 * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: 17 (WebCore::V8TestActiveDOMObject::wrapSlow): 18 * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: 19 (WebCore::V8TestCustomNamedGetter::wrapSlow): 20 * bindings/scripts/test/V8/V8TestEventConstructor.cpp: 21 (WebCore::V8TestEventConstructor::wrapSlow): 22 * bindings/scripts/test/V8/V8TestEventTarget.cpp: 23 (WebCore::V8TestEventTarget::wrapSlow): 24 * bindings/scripts/test/V8/V8TestInterface.cpp: 25 (WebCore::V8TestInterface::wrapSlow): 26 * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: 27 (WebCore::V8TestMediaQueryListListener::wrapSlow): 28 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: 29 (WebCore::V8TestNamedConstructor::wrapSlow): 30 * bindings/scripts/test/V8/V8TestObj.cpp: 31 (WebCore::V8TestObj::wrapSlow): 32 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: 33 (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): 34 1 35 2012-03-02 Igor Oliveira <igor.o@sisa.samsung.com> 2 36 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r109515 r109611 3038 3038 { 3039 3039 v8::Handle<v8::Object> wrapper; 3040 V8Proxy* proxy = 0; 3041 END 3042 3040 END 3041 3042 my $proxyInit; 3043 3043 if (IsNodeSubType($dataNode)) { 3044 $proxyInit = "V8Proxy::retrieve(impl->document()->frame())"; 3045 # DocumentType nodes are the only nodes that may have a NULL document. 3046 if ($interfaceName eq "DocumentType") { 3047 $proxyInit = "impl->document() ? $proxyInit : 0"; 3048 } 3049 } else { 3050 $proxyInit = "0"; 3051 } 3052 push(@implContent, <<END); 3053 V8Proxy* proxy = $proxyInit; 3054 END 3055 3056 if (IsSubType($dataNode, "Document")) { 3044 3057 push(@implContent, <<END); 3045 if (impl->document()) { 3046 proxy = V8Proxy::retrieve(impl->document()->frame()); 3047 if (proxy && static_cast<Node*>(impl->document()) == static_cast<Node*>(impl)) { 3048 if (proxy->windowShell()->context().IsEmpty() && proxy->windowShell()->initContextIfNeeded()) { 3049 // initContextIfNeeded may have created a wrapper for the object, retry from the start. 3050 return ${className}::wrap(impl); 3051 } 3052 } 3053 } 3054 3058 if (proxy && proxy->windowShell()->context().IsEmpty() && proxy->windowShell()->initContextIfNeeded()) { 3059 // initContextIfNeeded may have created a wrapper for the object, retry from the start. 3060 return ${className}::wrap(impl); 3061 } 3055 3062 END 3056 3063 } … … 3094 3101 3095 3102 push(@implContent, <<END); 3096 if ( wrapper.IsEmpty())3103 if (UNLIKELY(wrapper.IsEmpty())) 3097 3104 return wrapper; 3098 3105 END -
trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
r107304 r109611 126 126 V8Proxy* proxy = 0; 127 127 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 128 if ( wrapper.IsEmpty())128 if (UNLIKELY(wrapper.IsEmpty())) 129 129 return wrapper; 130 130 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp
r108201 r109611 180 180 if (!context.IsEmpty()) 181 181 context->Exit(); 182 if ( wrapper.IsEmpty())182 if (UNLIKELY(wrapper.IsEmpty())) 183 183 return wrapper; 184 184 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp
r107304 r109611 116 116 V8Proxy* proxy = 0; 117 117 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 118 if ( wrapper.IsEmpty())118 if (UNLIKELY(wrapper.IsEmpty())) 119 119 return wrapper; 120 120 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp
r106644 r109611 151 151 V8Proxy* proxy = 0; 152 152 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 153 if ( wrapper.IsEmpty())153 if (UNLIKELY(wrapper.IsEmpty())) 154 154 return wrapper; 155 155 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp
r107304 r109611 179 179 V8Proxy* proxy = 0; 180 180 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 181 if ( wrapper.IsEmpty())181 if (UNLIKELY(wrapper.IsEmpty())) 182 182 return wrapper; 183 183 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
r108757 r109611 312 312 V8Proxy* proxy = 0; 313 313 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 314 if ( wrapper.IsEmpty())314 if (UNLIKELY(wrapper.IsEmpty())) 315 315 return wrapper; 316 316 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
r107304 r109611 116 116 V8Proxy* proxy = 0; 117 117 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 118 if ( wrapper.IsEmpty())118 if (UNLIKELY(wrapper.IsEmpty())) 119 119 return wrapper; 120 120 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
r107304 r109611 161 161 V8Proxy* proxy = 0; 162 162 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 163 if ( wrapper.IsEmpty())163 if (UNLIKELY(wrapper.IsEmpty())) 164 164 return wrapper; 165 165 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
r108669 r109611 2094 2094 V8Proxy* proxy = 0; 2095 2095 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 2096 if ( wrapper.IsEmpty())2096 if (UNLIKELY(wrapper.IsEmpty())) 2097 2097 return wrapper; 2098 2098 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
r107304 r109611 198 198 V8Proxy* proxy = 0; 199 199 wrapper = V8DOMWrapper::instantiateV8Object(proxy, &info, impl); 200 if ( wrapper.IsEmpty())200 if (UNLIKELY(wrapper.IsEmpty())) 201 201 return wrapper; 202 202
Note: See TracChangeset
for help on using the changeset viewer.