Bug 161426 - Avoid using strong reference in JSDOMPromise’s DeferredWrapper
Summary: Avoid using strong reference in JSDOMPromise’s DeferredWrapper
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks: 161425
  Show dependency treegraph
 
Reported: 2016-08-30 22:33 PDT by Ryosuke Niwa
Modified: 2016-08-31 12:41 PDT (History)
9 users (show)

See Also:


Attachments
Patch (58.32 KB, patch)
2016-08-30 23:10 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Updated for ToT (58.37 KB, patch)
2016-08-30 23:30 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
CMake build fix attempt (58.87 KB, patch)
2016-08-31 00:03 PDT, Ryosuke Niwa
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2016-08-30 22:33:18 PDT
Avoid using JSC::Strong in DeferredWrapper.
This is needed to add “whenDefined” to CustomElementRegistry
which needs to keep the promise until the global object goes away in some cases.
Comment 1 Radar WebKit Bug Importer 2016-08-30 22:34:05 PDT
<rdar://problem/28091123>
Comment 2 Ryosuke Niwa 2016-08-30 23:10:20 PDT
Created attachment 287488 [details]
Patch
Comment 3 Mark Lam 2016-08-30 23:29:28 PDT
Can you rebase to ToT please?
Comment 4 Ryosuke Niwa 2016-08-30 23:30:18 PDT
Created attachment 287494 [details]
Updated for ToT
Comment 5 WebKit Commit Bot 2016-08-30 23:33:00 PDT
Attachment 287494 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/js/JSDOMGlobalObject.h:37:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 26 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Ryosuke Niwa 2016-08-31 00:03:33 PDT
Created attachment 287496 [details]
CMake build fix attempt
Comment 7 WebKit Commit Bot 2016-08-31 00:05:12 PDT
Attachment 287496 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/js/JSDOMGlobalObject.h:37:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 27 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Geoffrey Garen 2016-08-31 09:40:09 PDT
Comment on attachment 287496 [details]
CMake build fix attempt

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

r=me

> Source/WebCore/Modules/applepay/ApplePaySession.cpp:736
> +void ApplePaySession::canMakePaymentsWithActiveCard(ScriptExecutionContext& scriptExecutionContext, const String& merchantIdentifier, Ref<DeferredWrapper>&& pasesdPromise, ExceptionCode& ec)

passedPromise?

> Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:176
> +        deferredWrapper->visitDeferred(visitor);

We call functions like this "visitAggregate". I'm not sure I love that name, but let's use it to be consistent.
Comment 9 Ryosuke Niwa 2016-08-31 11:38:47 PDT
Committed r205257: <http://trac.webkit.org/changeset/205257>
Comment 10 Ryosuke Niwa 2016-08-31 12:41:16 PDT
Rebaselined binding tests in https://trac.webkit.org/changeset/205262.