RESOLVED FIXED 129445
Web Replay: add infrastructure for auto-memoizing nondeterministic DOM APIs
https://bugs.webkit.org/show_bug.cgi?id=129445
Summary Web Replay: add infrastructure for auto-memoizing nondeterministic DOM APIs
Blaze Burg
Reported 2014-02-27 13:49:54 PST
This intercession mechanism allows a developer to put [Nondeterministic] on an attribute or method in WebIDL. The code generator will automatically capture or replay the value using AutoMemoized<T>, a subclass of NondeterministicInput for T. (Maybe it should be called MemoizedValue<T>?)
Attachments
WIP patch (24.74 KB, patch)
2014-03-04 19:29 PST, Blaze Burg
no flags
the complete patch (37.70 KB, patch)
2014-03-06 20:04 PST, Blaze Burg
timothy: review+
bad attachment (41.46 KB, patch)
2014-03-06 20:06 PST, Blaze Burg
no flags
IDL changes (2.13 KB, patch)
2014-03-06 20:08 PST, Blaze Burg
no flags
sample generated code (6.96 KB, text/plain)
2014-03-06 20:15 PST, Blaze Burg
no flags
Blaze Burg
Comment 1 2014-03-04 19:29:12 PST
Created attachment 225844 [details] WIP patch
Blaze Burg
Comment 2 2014-03-06 20:04:05 PST
Created attachment 226076 [details] the complete patch
WebKit Commit Bot
Comment 3 2014-03-06 20:06:15 PST
Attachment 226076 [details] did not pass style-queue: ERROR: Source/WebCore/replay/MemoizedDOMResult.h:117: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/replay/ReplayInputTypes.cpp:42: Wrong number of spaces before statement. (expected: 4) [whitespace/indent] [4] Total errors found: 2 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Blaze Burg
Comment 4 2014-03-06 20:06:48 PST
Created attachment 226077 [details] bad attachment I also attached the IDL changes I used to test the build and the various cases the code generator has to support for WEB_REPLAY and vanilla builds. The IDL changes won't be included in this patch, since they need separate testing.
Blaze Burg
Comment 5 2014-03-06 20:08:50 PST
Created attachment 226078 [details] IDL changes
Blaze Burg
Comment 6 2014-03-06 20:15:07 PST
Created attachment 226079 [details] sample generated code
Timothy Hatcher
Comment 7 2014-03-12 11:35:29 PDT
Comment on attachment 226076 [details] the complete patch View in context: https://bugs.webkit.org/attachment.cgi?id=226076&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2208 > + push(@implContent, " }\n"); I'd add another \n here to give breathing room between the blocks. > Source/WebCore/replay/MemoizedDOMResult.cpp:76 > + encodedValue.put<String>("attribute", input.attribute()); These strings passed to put and get should use ASCIILiteral().
Joseph Pecoraro
Comment 8 2014-03-12 11:46:16 PDT
Comment on attachment 226076 [details] the complete patch View in context: https://bugs.webkit.org/attachment.cgi?id=226076&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3548 > + push(@implContent, $indent . "if (!cursor.isReplaying())\n"); > + push(@implContent, $indent . " $functionString;\n"); Shouldn't this also setDOMException if raises exception inside this if block?
Blaze Burg
Comment 9 2014-03-12 17:42:24 PDT
Note You need to log in before you can comment on or make changes to this bug.