Bug 173678 - [WebCrypto] Restore ordering of CryptoAlgorithmIdentifier in SerializedScriptValue
Summary: [WebCrypto] Restore ordering of CryptoAlgorithmIdentifier in SerializedScript...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: InRadar
: 174141 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-21 16:17 PDT by Jiewen Tan
Modified: 2017-07-18 11:35 PDT (History)
12 users (show)

See Also:


Attachments
Patch (1.84 KB, patch)
2017-06-21 16:27 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2017-06-21 16:17:08 PDT
r218030 reorders the ordering of CryptoAlgorithmIdentifier in SerializedScriptValue, which introduce backward compatibility issue with CryptoKey objects stored in the IndexedDB. Hence, we should restore it back.
Comment 1 Jiewen Tan 2017-06-21 16:17:38 PDT
<rdar://problem/32879314>
Comment 2 Jiewen Tan 2017-06-21 16:27:12 PDT
Created attachment 313561 [details]
Patch
Comment 3 Jiewen Tan 2017-06-21 16:28:30 PDT
Here is r218030 for reference.
https://trac.webkit.org/changeset/218030/webkit
Comment 4 Build Bot 2017-06-21 16:28:54 PDT
Attachment 313561 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:245:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:246:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:247:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:248:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:249:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:250:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:251:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:252:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:253:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:254:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/bindings/js/SerializedScriptValue.cpp:255:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 11 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Sam Weinig 2017-06-21 16:37:58 PDT
Comment on attachment 313561 [details]
Patch

Seems like we should have some tests that read from pre-baked IndexedDB databases (e.g. checkin the database to the tests repository, and teach WKTR and DRT to be able to use that database for a particular test).
Comment 6 Jiewen Tan 2017-06-21 16:41:02 PDT
(In reply to Sam Weinig from comment #5)
> Comment on attachment 313561 [details]
> Patch
> 
> Seems like we should have some tests that read from pre-baked IndexedDB
> databases (e.g. checkin the database to the tests repository, and teach WKTR
> and DRT to be able to use that database for a particular test).

Agreed. Glad to help to make this happen.
Comment 7 Jiewen Tan 2017-06-21 16:44:46 PDT
Comment on attachment 313561 [details]
Patch

Thanks Sam for r+ my patch.
Comment 8 WebKit Commit Bot 2017-06-21 17:41:01 PDT
Comment on attachment 313561 [details]
Patch

Clearing flags on attachment: 313561

Committed r218666: <http://trac.webkit.org/changeset/218666>
Comment 9 WebKit Commit Bot 2017-06-21 17:41:03 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Jon Lee 2017-07-18 11:35:56 PDT
*** Bug 174141 has been marked as a duplicate of this bug. ***