Bug 122770

Summary: window.crypto doesn't preserve custom properties
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebCore JavaScriptAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, esprehn+autocc, ggaren, kondapallykalyan, mhahnenberg, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 122679    
Attachments:
Description Flags
proposed fix mhahnenberg: review+

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

r=me
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;

Shenanigans!