Bug 122770 - window.crypto doesn't preserve custom properties
Summary: window.crypto doesn't preserve custom properties
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
Depends on:
Blocks: 122679
  Show dependency treegraph
Reported: 2013-10-14 12:05 PDT by Alexey Proskuryakov
Modified: 2013-10-31 13:30 PDT (History)
7 users (show)

See Also:

proposed fix (6.69 KB, patch)
2013-10-14 12:26 PDT, Alexey Proskuryakov
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2013-10-14 12:05:28 PDT
GC doesn't preserve Crypto wrapper even when it's observable.
Comment 1 Alexey Proskuryakov 2013-10-14 12:26:19 PDT
Created attachment 214179 [details]
proposed fix
Comment 2 WebKit Commit Bot 2013-10-14 12:28:22 PDT
Attachment 214179 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/security/crypto-gc-expected.txt', u'LayoutTests/security/crypto-gc.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/page/Crypto.cpp', u'Source/WebCore/page/Crypto.h', u'Source/WebCore/page/Crypto.idl', u'Source/WebCore/page/DOMWindow.cpp']" exit_code: 1
Source/WebCore/page/Crypto.h:57:  The parameter name "document" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 8 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mark Hahnenberg 2013-10-14 12:31:57 PDT
Comment on attachment 214179 [details]
proposed fix

Comment 4 Alexey Proskuryakov 2013-10-14 13:27:28 PDT
Committed r157417.
Comment 5 Geoffrey Garen 2013-10-14 20:13:17 PDT
Comment on attachment 214179 [details]
proposed fix

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

> Source/WebCore/page/DOMWindow.cpp:596
> +    // FIXME: Why is crypto not available when the window is not currently displayed in a frame?
>      if (!isCurrentlyDisplayedInFrame())
>          return 0;