Bug 140512

Summary: Web Replay: convert to is<T> and downcast<T> for decoding replay inputs
Product: WebKit Reporter: Brian Burg <burg>
Component: WebCore Misc.Assignee: Brian Burg <burg>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, joepeck, kling, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 136290    
Attachments:
Description Flags
Patch cdumez: review+

Description Brian Burg 2015-01-15 14:04:45 PST
There's a big switch/if chain in 
EncodingTraits<NondeterministicInputBase>::decodeValue/encodeValue() that should be converted.

This should require some fairly trivial changes to the input code generator to make the TypeCastTraits specializations.
Comment 1 Brian Burg 2015-01-18 09:56:23 PST
Created attachment 244862 [details]
Patch
Comment 2 WebKit Commit Bot 2015-01-18 09:58:38 PST
This patch modifies the WEB_REPLAY inputs generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-input-generator-tests --reset-results`)
Comment 3 WebKit Commit Bot 2015-01-18 09:58:49 PST
Attachment 244862 [details] did not pass style-queue:


ERROR: Source/WebCore/replay/SerializationMethods.cpp:169:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 1 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Chris Dumez 2015-01-19 11:53:33 PST
Comment on attachment 244862 [details]
Patch

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

r=me

> Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-guard.json-TestReplayInputs.h:91
> +#if ENABLE(DUMMY_FEATURE)

What is this DUMMY_FEATURE?

> Source/WebCore/replay/MemoizedDOMResult.h:155
> +    

New spaces?
Comment 5 Brian Burg 2015-01-19 11:56:25 PST
Comment on attachment 244862 [details]
Patch

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

>> Source/JavaScriptCore/replay/scripts/tests/expected/generate-input-with-guard.json-TestReplayInputs.h:91
>> +#if ENABLE(DUMMY_FEATURE)
> 
> What is this DUMMY_FEATURE?

This test covers generation of ENABLE guards. Useful for inputs related to TOUCH_EVENTS, REQUEST_ANIMATION_FRAME, etc.

>> Source/WebCore/replay/MemoizedDOMResult.h:155
>> +    
> 
> New spaces?

Oops, Xcode :(
Comment 6 Brian Burg 2015-01-19 12:49:33 PST
Committed r178668: <http://trac.webkit.org/changeset/178668>