Summary: | [V8] Get rid of more function-level static FunctionTemplates and ObjectTemplates in bindings | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Marja Hölttä <marja> | ||||
Component: | New Bugs | Assignee: | Marja Hölttä <marja> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | abarth, buildbot, dcarney, haraken, japhet, rniwa, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 111724 | ||||||
Attachments: |
|
Description
Marja Hölttä
2013-03-13 08:41:10 PDT
Created attachment 192940 [details]
Patch
Comment on attachment 192940 [details] Patch Attachment 192940 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/17134546 New failing tests: fast/forms/range/slider-delete-while-dragging-thumb.html Comment on attachment 192940 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192940&action=review > Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp:58 > + static const char* shadowTemplateUniqueKey = "wrapInShadowObjectShadowTemplate"; why are you not just duplicating the static as in V8DOMWindow::GetShadowObjectTemplate? Comment on attachment 192940 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192940&action=review >> Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp:58 >> + static const char* shadowTemplateUniqueKey = "wrapInShadowObjectShadowTemplate"; > > why are you not just duplicating the static as in V8DOMWindow::GetShadowObjectTemplate? Because we have a mechanism for storing these kind of "private" FunctionTemplates (but not private ObjectTemplates). And this is (supposedly) more sane than having non-trivial statics inside funcs. Comment on attachment 192940 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192940&action=review >>> Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp:58 >>> + static const char* shadowTemplateUniqueKey = "wrapInShadowObjectShadowTemplate"; >> >> why are you not just duplicating the static as in V8DOMWindow::GetShadowObjectTemplate? > > Because we have a mechanism for storing these kind of "private" FunctionTemplates (but not private ObjectTemplates). And this is (supposedly) more sane than having non-trivial statics inside funcs. wouldn't it be more sane to introduce private object templates then? Comment on attachment 192940 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192940&action=review >>>> Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp:58 >>>> + static const char* shadowTemplateUniqueKey = "wrapInShadowObjectShadowTemplate"; >>> >>> why are you not just duplicating the static as in V8DOMWindow::GetShadowObjectTemplate? >> >> Because we have a mechanism for storing these kind of "private" FunctionTemplates (but not private ObjectTemplates). And this is (supposedly) more sane than having non-trivial statics inside funcs. > > wouldn't it be more sane to introduce private object templates then? For only this one case? Comment on attachment 192940 [details]
Patch
ok
Comment on attachment 192940 [details] Patch Clearing flags on attachment: 192940 Committed r145765: <http://trac.webkit.org/changeset/145765> All reviewed patches have been landed. Closing bug. Comment on attachment 192940 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192940&action=review >>>>> Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp:58 >>>>> + static const char* shadowTemplateUniqueKey = "wrapInShadowObjectShadowTemplate"; >>>> >>>> why are you not just duplicating the static as in V8DOMWindow::GetShadowObjectTemplate? >>> >>> Because we have a mechanism for storing these kind of "private" FunctionTemplates (but not private ObjectTemplates). And this is (supposedly) more sane than having non-trivial statics inside funcs. >> >> wouldn't it be more sane to introduce private object templates then? > > For only this one case? The way wrapInShadowObject() is called is very special and weird... I'm going to move the logic to V8HTMLDocument::wrap(). |