RESOLVED FIXED 112262
[V8] Get rid of more function-level static FunctionTemplates and ObjectTemplates in bindings
https://bugs.webkit.org/show_bug.cgi?id=112262
Summary [V8] Get rid of more function-level static FunctionTemplates and ObjectTempla...
Marja Hölttä
Reported 2013-03-13 08:41:10 PDT
Bug 111971 wasn't quite enough, there is more. :/ This will also make some tests pass even if we add the original (reverted) patch from bug 111724 (but not all, so more fixes are needed).
Attachments
Patch (8.25 KB, patch)
2013-03-13 10:00 PDT, Marja Hölttä
no flags
Marja Hölttä
Comment 1 2013-03-13 10:00:13 PDT
Build Bot
Comment 2 2013-03-13 11:46:49 PDT
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
jochen
Comment 3 2013-03-13 14:46:16 PDT
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?
Marja Hölttä
Comment 4 2013-03-13 14:54:01 PDT
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.
jochen
Comment 5 2013-03-13 15:25:36 PDT
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?
Marja Hölttä
Comment 6 2013-03-13 15:34:12 PDT
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?
jochen
Comment 7 2013-03-13 15:43:13 PDT
Comment on attachment 192940 [details] Patch ok
WebKit Review Bot
Comment 8 2013-03-13 15:52:25 PDT
Comment on attachment 192940 [details] Patch Clearing flags on attachment: 192940 Committed r145765: <http://trac.webkit.org/changeset/145765>
WebKit Review Bot
Comment 9 2013-03-13 15:52:29 PDT
All reviewed patches have been landed. Closing bug.
Kentaro Hara
Comment 10 2013-03-13 17:19:30 PDT
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().
Note You need to log in before you can comment on or make changes to this bug.