Changeset 166249 in webkit
- Timestamp:
- Mar 25, 2014 1:43:27 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r166248 r166249 1 2014-03-25 Michael Saboff <msaboff@apple.com> 2 3 Unreviewed, rolling out r166070. 4 5 Rollout r166070 due to 2% performance loss in page load times 6 7 Reverted changeset: 8 9 "Change CodeGeneratorJS.pm special cases for "DOMWindow" to be 10 general purpose" 11 https://bugs.webkit.org/show_bug.cgi?id=130553 12 http://trac.webkit.org/changeset/166070 13 1 14 2014-03-25 Michael Saboff <msaboff@apple.com> 2 15 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r166128 r166249 2128 2128 2129 2129 if (!$attribute->isStatic || $attribute->signature->type =~ /Constructor$/) { 2130 if ($interface->extendedAttributes->{"CustomProxyToJSObject"}) { 2131 push(@implContent, " ${className}* castedThis = to${className}(JSValue::decode(thisValue));\n"); 2130 if ($interfaceName eq "DOMWindow") { 2131 push(@implContent, " ${className}* castedThis = jsDynamicCast<$className*>(JSValue::decode(thisValue));\n"); 2132 push(@implContent, " if (UNLIKELY(!castedThis)) {\n"); 2133 push(@implContent, " if (JSDOMWindowShell* shell = jsDynamicCast<JSDOMWindowShell*>(JSValue::decode(thisValue)))\n"); 2134 push(@implContent, " castedThis = shell->window();\n"); 2135 push(@implContent, " }\n"); 2132 2136 push(@implContent, " UNUSED_PARAM(slotBase);\n"); 2133 2137 } else { … … 2347 2351 push(@implContent, " UNUSED_PARAM(baseValue);\n"); 2348 2352 push(@implContent, " UNUSED_PARAM(thisValue);\n"); 2349 if ($interface->extendedAttributes->{"CustomProxyToJSObject"}) { 2350 push(@implContent, " ${className}* domObject = to${className}(JSValue::decode(thisValue));\n"); 2353 if ($interfaceName eq "DOMWindow") { 2354 push(@implContent, " ${className}* domObject = jsDynamicCast<$className*>(JSValue::decode(thisValue));\n"); 2355 push(@implContent, " if (!domObject) {\n"); 2356 push(@implContent, " if (JSDOMWindowShell* shell = jsDynamicCast<JSDOMWindowShell*>(JSValue::decode(thisValue)))\n"); 2357 push(@implContent, " domObject = shell->window();\n"); 2358 push(@implContent, " }\n"); 2351 2359 } else { 2352 2360 push(@implContent, " ${className}* domObject = jsDynamicCast<${className}*>(JSValue::decode(thisValue));\n") if ConstructorShouldBeOnInstance($interface); … … 2372 2380 push(@implContent, "{\n"); 2373 2381 push(@implContent, " JSValue value = JSValue::decode(encodedValue);"); 2374 if ($interface->extendedAttributes->{"CustomProxyToJSObject"}) { 2375 push(@implContent, " ${className}* castedThis = to${className}(JSValue::decode(thisValue));\n"); 2376 } else { 2377 push(@implContent, " ${className}* castedThis = jsDynamicCast<${className}*>(JSValue::decode(thisValue));\n"); 2382 push(@implContent, " ${className}* castedThis = jsDynamicCast<${className}*>(JSValue::decode(thisValue));\n"); 2383 if ($interfaceName eq "DOMWindow") { 2384 push(@implContent, " if (UNLIKELY(!castedThis)) {\n"); 2385 push(@implContent, " if (JSDOMWindowShell* shell = jsDynamicCast<JSDOMWindowShell*>(JSValue::decode(thisValue)))\n"); 2386 push(@implContent, " castedThis = shell->window();\n"); 2387 push(@implContent, " }\n"); 2378 2388 } 2379 2389 push(@implContent, " if (UNLIKELY(!castedThis)) {\n"); … … 2479 2489 push(@implContent, " UNUSED_PARAM(exec);\n"); 2480 2490 if (!$attribute->isStatic) { 2481 if ($interface->extendedAttributes->{"CustomProxyToJSObject"}) { 2482 push(@implContent, " ${className}* castedThis = to${className}(JSValue::decode(thisValue));\n"); 2483 } else { 2484 push(@implContent, " ${className}* castedThis = jsDynamicCast<${className}*>(JSValue::decode(thisValue));\n"); 2491 push(@implContent, " ${className}* castedThis = jsDynamicCast<${className}*>(JSValue::decode(thisValue));\n"); 2492 if ($interfaceName eq "DOMWindow") { 2493 push(@implContent, " if (UNLIKELY(!castedThis)) {\n"); 2494 push(@implContent, " if (JSDOMWindowShell* shell = jsDynamicCast<JSDOMWindowShell*>(JSValue::decode(thisValue)))\n"); 2495 push(@implContent, " castedThis = shell->window();\n"); 2496 push(@implContent, " }\n"); 2485 2497 } 2486 2498 push(@implContent, " if (UNLIKELY(!castedThis)) {\n"); … … 2707 2719 } 2708 2720 } else { 2709 if ($interface ->extendedAttributes->{"CustomProxyToJSObject"}) {2710 push(@implContent, " $className* castedThis = to ${className}(exec->hostThisValue().toThis(exec, NotStrictMode));\n");2721 if ($interfaceName eq "DOMWindow") { 2722 push(@implContent, " $className* castedThis = toJSDOMWindow(exec->hostThisValue().toThis(exec, NotStrictMode));\n"); 2711 2723 push(@implContent, " if (UNLIKELY(!castedThis))\n"); 2712 2724 push(@implContent, " return throwVMTypeError(exec);\n"); -
trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt
r166070 r166249 44 44 CustomNamedGetter 45 45 CustomNamedSetter 46 CustomProxyToJSObject47 46 CustomPutFunction 48 47 CustomReturn -
trunk/Source/WebCore/page/DOMWindow.idl
r166070 r166249 31 31 CustomGetOwnPropertySlot, 32 32 CustomEnumerateProperty, 33 CustomProxyToJSObject,34 33 JSCustomMarkFunction, 35 34 JSCustomToNativeObject,
Note: See TracChangeset
for help on using the changeset viewer.