Bug 91924 - [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not implicitly assume ScriptExecutionContext for static attributes
Summary: [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not implicitly assume Sc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords: InRadar
Depends on: 91764
Blocks: 88919 92413
  Show dependency treegraph
 
Reported: 2012-07-21 03:18 PDT by Kentaro Hara
Modified: 2012-07-26 12:51 PDT (History)
7 users (show)

See Also:


Attachments
Patch (12.62 KB, patch)
2012-07-23 19:51 PDT, Kentaro Hara
haraken: commit-queue-
Details | Formatted Diff | Diff
fix indentation, patch for landing (27.25 KB, patch)
2012-07-23 23:04 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>