Bug 91924

Summary: [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not implicitly assume ScriptExecutionContext for static attributes
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, japhet, jochen, jonlee, oliver, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 91764    
Bug Blocks: 88919, 92413    
Attachments:
Description Flags
Patch
haraken: commit-queue-
fix indentation, patch for landing none

Description Kentaro Hara 2012-07-21 03:18:43 PDT
r122912 implemented static attributes in CodeGeneratorJS.pm. The generated code implicitly assumes that a static attribute always requires ScriptExecutionContext, which is wrong. If ScriptExecutionContext is needed, we should specify [CallWith=ScriptExecutionContext].

I will upload a patch after bug 91764 is fixed.
Comment 1 Kentaro Hara 2012-07-23 19:51:25 PDT
Created attachment 153942 [details]
Patch
Comment 2 Kentaro Hara 2012-07-23 19:54:02 PDT
Comment on attachment 153942 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=153942&action=review

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:-1887
>                      }
> -                }

Indentation is wrong here. Let me fix it in a follow-up patch (because the indentation fix will mess up this patch).

> Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp:248
> +    JSValue result = jsNumber(TestSupplemental::supplementalStaticReadOnlyAttr(impl));

Passing 'impl' is wrong. This will be fixed in bug 91925.
Comment 3 Adam Barth 2012-07-23 22:58:32 PDT
Thanks for keeping the diff clean.  rs=me to fix the indent.
Comment 4 Kentaro Hara 2012-07-23 23:04:23 PDT
Created attachment 153967 [details]
fix indentation, patch for landing
Comment 5 WebKit Review Bot 2012-07-24 00:21:45 PDT
Comment on attachment 153967 [details]
fix indentation, patch for landing

Clearing flags on attachment: 153967

Committed r123433: <http://trac.webkit.org/changeset/123433>
Comment 6 Jon Lee 2012-07-24 12:15:12 PDT
This patch does not appropriately call the static attribute function with ScriptExecutionContext if [CallWith=ScriptExecutionContext] is specified.
Comment 7 Jon Lee 2012-07-24 12:17:35 PDT
(In reply to comment #6)
> This patch does not appropriately call the static attribute function with ScriptExecutionContext if [CallWith=ScriptExecutionContext] is specified.

Sorry I misspoke, I put the attribute in the wrong place.
Comment 8 Radar WebKit Bug Importer 2012-07-24 12:52:41 PDT
<rdar://problem/11947922>