Changeset 166249 in webkit


Ignore:
Timestamp:
Mar 25, 2014 1:43:27 PM (10 years ago)
Author:
msaboff@apple.com
Message:

Unreviewed, rolling out r166070.

Rollout r166070 due to 2% performance loss in page load times

Reverted changeset:

"Change CodeGeneratorJS.pm special cases for "DOMWindow" to be
general purpose"
https://bugs.webkit.org/show_bug.cgi?id=130553
http://trac.webkit.org/changeset/166070

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r166248 r166249  
     12014-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
    1142014-03-25  Michael Saboff  <msaboff@apple.com>
    215
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r166128 r166249  
    21282128
    21292129            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");
    21322136                    push(@implContent, "    UNUSED_PARAM(slotBase);\n");
    21332137                } else {
     
    23472351            push(@implContent, "    UNUSED_PARAM(baseValue);\n");
    23482352            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");
    23512359            } else {
    23522360                push(@implContent, "    ${className}* domObject = jsDynamicCast<${className}*>(JSValue::decode(thisValue));\n") if ConstructorShouldBeOnInstance($interface);
     
    23722380            push(@implContent, "{\n");
    23732381            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");
    23782388            }
    23792389            push(@implContent, "    if (UNLIKELY(!castedThis)) {\n");
     
    24792489                push(@implContent, "    UNUSED_PARAM(exec);\n");
    24802490                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");
    24852497                    }
    24862498                    push(@implContent, "    if (UNLIKELY(!castedThis)) {\n");
     
    27072719                }
    27082720            } 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");
    27112723                    push(@implContent, "    if (UNLIKELY(!castedThis))\n");
    27122724                    push(@implContent, "        return throwVMTypeError(exec);\n");
  • trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt

    r166070 r166249  
    4444CustomNamedGetter
    4545CustomNamedSetter
    46 CustomProxyToJSObject
    4746CustomPutFunction
    4847CustomReturn
  • trunk/Source/WebCore/page/DOMWindow.idl

    r166070 r166249  
    3131    CustomGetOwnPropertySlot,
    3232    CustomEnumerateProperty,
    33     CustomProxyToJSObject,
    3433    JSCustomMarkFunction,
    3534    JSCustomToNativeObject,
Note: See TracChangeset for help on using the changeset viewer.