Bug 164742 - Update SubtleCrypto::digest to match the latest spec
Summary: Update SubtleCrypto::digest to match the latest spec
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: 160883
  Show dependency treegraph
 
Reported: 2016-11-14 15:55 PST by Jiewen Tan
Modified: 2016-11-30 16:28 PST (History)
8 users (show)

See Also:


Attachments
Patch (60.98 KB, patch)
2016-11-27 13:26 PST, Jiewen Tan
darin: review+
Details | Formatted Diff | Diff
Patch for landing (60.88 KB, patch)
2016-11-30 13:48 PST, Jiewen Tan
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2016-11-14 15:55:18 PST
Update SubtleCrypto::digest to match the latest spec.
Comment 1 Radar WebKit Bug Importer 2016-11-14 16:48:10 PST
<rdar://problem/29258037>
Comment 2 Jiewen Tan 2016-11-27 13:26:55 PST
Created attachment 295461 [details]
Patch
Comment 3 Darin Adler 2016-11-28 09:29:30 PST
Comment on attachment 295461 [details]
Patch

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

> Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp:537
> +    JSSubtleCrypto* subtle = jsDynamicDowncast<JSSubtleCrypto*>(state.thisValue());
> +    ASSERT(subtle);

Why can we assert this? Can’t this function be called with an object that is a not a JSSubtleCrypto?
Comment 4 Jiewen Tan 2016-11-28 12:10:16 PST
Comment on attachment 295461 [details]
Patch

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

Thanks Darin for r+ my patch.

>> Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp:537
>> +    ASSERT(subtle);
> 
> Why can we assert this? Can’t this function be called with an object that is a not a JSSubtleCrypto?

I don't think so. This function is sealed inside the JSSubtleCryptoCustom.cpp file, and only JSSubtleCrypto::digest will call it. If no mistakes being made afterwards, this function should not be called with an object that is not a JSSubtleCrypto.
Comment 5 Jiewen Tan 2016-11-30 13:48:14 PST
Created attachment 295759 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2016-11-30 14:26:35 PST
Comment on attachment 295759 [details]
Patch for landing

Rejecting attachment 295759 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 295759, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
    -> origin/master
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 209152 = ee9c679382b170b20f375d470b55276f20aa526d
r209153 = 81c34d6f608f348ee25f095d35723aa7402ed50d
r209154 = 0bc77effebf4a1d87caf78b287e1348281916fc8
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: http://webkit-queues.webkit.org/results/2597344
Comment 7 Jiewen Tan 2016-11-30 16:28:35 PST
Committed r209164: <http://trac.webkit.org/changeset/209164>