Bug 162640 - Expose CryptoKey to web workers
Summary: Expose CryptoKey to web workers
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
Depends on:
Blocks: 160877
  Show dependency treegraph
 
Reported: 2016-09-27 15:40 PDT by Jiewen Tan
Modified: 2016-09-29 21:08 PDT (History)
12 users (show)

See Also:


Attachments
Patch (97.56 KB, patch)
2016-09-28 19:34 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-yosemite (1.13 MB, application/zip)
2016-09-28 20:23 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-yosemite (1.64 MB, application/zip)
2016-09-28 20:29 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-elcapitan-wk2 (17.86 MB, application/zip)
2016-09-28 20:37 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (1.05 MB, application/zip)
2016-09-28 21:25 PDT, Build Bot
no flags Details
Patch (99.17 KB, patch)
2016-09-29 11:49 PDT, Jiewen Tan
bfulgham: review+
bfulgham: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (1.07 MB, application/zip)
2016-09-29 14:46 PDT, Build Bot
no flags Details
Patch for landing (99.18 KB, patch)
2016-09-29 15:07 PDT, Jiewen Tan
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (1.08 MB, application/zip)
2016-09-29 16:08 PDT, Build Bot
no flags Details
Patch for landing (96.36 KB, patch)
2016-09-29 16:37 PDT, Jiewen Tan
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (976.27 KB, application/zip)
2016-09-29 17:34 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2016-09-27 15:40:16 PDT
Expose CryptoKey to web workers
Comment 1 Jiewen Tan 2016-09-27 15:41:51 PDT
<rdar://problem/28182204>
Comment 2 Jiewen Tan 2016-09-28 19:34:00 PDT
Created attachment 290163 [details]
Patch
Comment 3 Build Bot 2016-09-28 20:23:16 PDT
Comment on attachment 290163 [details]
Patch

Attachment 290163 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2165490

New failing tests:
js/dom/global-constructors-attributes-dedicated-worker.html
Comment 4 Build Bot 2016-09-28 20:23:20 PDT
Created attachment 290169 [details]
Archive of layout-test-results from ews102 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 Build Bot 2016-09-28 20:28:56 PDT
Comment on attachment 290163 [details]
Patch

Attachment 290163 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2165489

New failing tests:
js/dom/global-constructors-attributes-dedicated-worker.html
Comment 6 Build Bot 2016-09-28 20:29:00 PDT
Created attachment 290170 [details]
Archive of layout-test-results from ews112 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-09-28 20:37:12 PDT
Comment on attachment 290163 [details]
Patch

Attachment 290163 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2165498

New failing tests:
js/dom/global-constructors-attributes-dedicated-worker.html
Comment 8 Build Bot 2016-09-28 20:37:16 PDT
Created attachment 290173 [details]
Archive of layout-test-results from ews125 for ios-simulator-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 9 Build Bot 2016-09-28 21:25:06 PDT
Comment on attachment 290163 [details]
Patch

Attachment 290163 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2165788

New failing tests:
js/dom/global-constructors-attributes-dedicated-worker.html
Comment 10 Build Bot 2016-09-28 21:25:10 PDT
Created attachment 290175 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 11 Jiewen Tan 2016-09-29 11:49:01 PDT
Created attachment 290226 [details]
Patch
Comment 12 Brent Fulgham 2016-09-29 13:52:45 PDT
Comment on attachment 290226 [details]
Patch

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

Looks good! Please correct the typos I pointed out, but otherwise this looks fine.

> Source/WebCore/crypto/SerializedCryptoKeyWrap.h:37
> +// any other local storages that go through this structured clone algorithm. However, a side effect

"... any other local STORAGE that go ..."

> Source/WebCore/crypto/SerializedCryptoKeyWrap.h:38
> +// of this extra layer protection is redundant communications between mainThread(document) and

"... extra layer OF protection is ..."

> Source/WebCore/workers/WorkerGlobalScope.cpp:389
> +    bool result, done = false;

result is uninitialized here.

> Source/WebCore/workers/WorkerGlobalScope.h:149
> +    // CryptoKey data that went through structured clone algorithm to local storages such as

"... that went through THE structured clone algorithm to local STORAGE such as ..."

> Source/WebCore/workers/WorkerGlobalScope.h:152
> +    // to unwrap/wrap crypto keys. Hence, workerThreads will then ask mainThread back for unwrap/wrap

"Hence, worker threads MUST ALWAYS ask mainThread TO unwrap/wrap"
Comment 13 Build Bot 2016-09-29 14:45:55 PDT
Comment on attachment 290226 [details]
Patch

Attachment 290226 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2170537

New failing tests:
fast/images/pixel-crack-image-background-webkit-transform-scale.html
Comment 14 Build Bot 2016-09-29 14:46:01 PDT
Created attachment 290246 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 15 Jiewen Tan 2016-09-29 15:07:36 PDT
Created attachment 290252 [details]
Patch for landing
Comment 16 Jiewen Tan 2016-09-29 15:08:50 PDT
Comment on attachment 290226 [details]
Patch

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

Thank you Brent for reviewing my patch.

>> Source/WebCore/crypto/SerializedCryptoKeyWrap.h:37
>> +// any other local storages that go through this structured clone algorithm. However, a side effect
> 
> "... any other local STORAGE that go ..."

Fixed.

>> Source/WebCore/crypto/SerializedCryptoKeyWrap.h:38
>> +// of this extra layer protection is redundant communications between mainThread(document) and
> 
> "... extra layer OF protection is ..."

Fixed.

>> Source/WebCore/workers/WorkerGlobalScope.cpp:389
>> +    bool result, done = false;
> 
> result is uninitialized here.

Fixed.

>> Source/WebCore/workers/WorkerGlobalScope.h:149
>> +    // CryptoKey data that went through structured clone algorithm to local storages such as
> 
> "... that went through THE structured clone algorithm to local STORAGE such as ..."

Fixed.

>> Source/WebCore/workers/WorkerGlobalScope.h:152
>> +    // to unwrap/wrap crypto keys. Hence, workerThreads will then ask mainThread back for unwrap/wrap
> 
> "Hence, worker threads MUST ALWAYS ask mainThread TO unwrap/wrap"

Fixed.
Comment 17 Build Bot 2016-09-29 16:08:27 PDT
Comment on attachment 290252 [details]
Patch for landing

Attachment 290252 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2170995

New failing tests:
fast/images/pixel-crack-image-background-webkit-transform-scale.html
Comment 18 Build Bot 2016-09-29 16:08:31 PDT
Created attachment 290260 [details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 19 Jiewen Tan 2016-09-29 16:33:36 PDT
Conflicts with Brady's patch. Will upload a new one without WK2 changes.
Comment 20 Jiewen Tan 2016-09-29 16:37:56 PDT
Created attachment 290263 [details]
Patch for landing
Comment 21 Build Bot 2016-09-29 17:33:59 PDT
Comment on attachment 290263 [details]
Patch for landing

Attachment 290263 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2171407

New failing tests:
fast/images/pixel-crack-image-background-webkit-transform-scale.html
Comment 22 Build Bot 2016-09-29 17:34:03 PDT
Created attachment 290271 [details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 23 Jiewen Tan 2016-09-29 17:49:53 PDT
Committed r206627: <http://trac.webkit.org/changeset/206627>