Bug 196341 - [JSC] Drop VM and Context cache map in JavaScriptCore.framework
Summary: [JSC] Drop VM and Context cache map in JavaScriptCore.framework
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-27 23:38 PDT by Yusuke Suzuki
Modified: 2019-07-11 11:03 PDT (History)
7 users (show)

See Also:


Attachments
Patch (11.90 KB, patch)
2019-03-27 23:43 PDT, Yusuke Suzuki
sbarati: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-03-27 23:38:54 PDT
[JSC] Drop VM and Context cache map in JavaScriptCore.framework
Comment 1 Yusuke Suzuki 2019-03-27 23:43:21 PDT
Created attachment 366155 [details]
Patch
Comment 2 Saam Barati 2019-03-28 08:54:41 PDT
Comment on attachment 366155 [details]
Patch

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

> Source/JavaScriptCore/API/JSContext.mm:89
> +    toJSGlobalObject(m_context)->setAPIWrapper((__bridge void*)self);

Why are these bridge casts?
Comment 3 Yusuke Suzuki 2019-03-28 12:27:56 PDT
Comment on attachment 366155 [details]
Patch

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

Thanks!

>> Source/JavaScriptCore/API/JSContext.mm:89
>> +    toJSGlobalObject(m_context)->setAPIWrapper((__bridge void*)self);
> 
> Why are these bridge casts?

This makes the code OK even if ARC is enabled, ensuring we do not insert any ARC retaining operations.
http://clang.llvm.org/docs/AutomaticReferenceCounting.html#bridged-casts
Like this change. https://trac.webkit.org/changeset/233409/webkit
Comment 4 Yusuke Suzuki 2019-03-28 12:38:38 PDT
Committed r243617: <https://trac.webkit.org/changeset/243617>
Comment 5 Radar WebKit Bug Importer 2019-03-28 12:39:16 PDT
<rdar://problem/49390987>
Comment 6 Yusuke Suzuki 2019-07-11 02:42:28 PDT
Committed r247346: <https://trac.webkit.org/changeset/247346>
Comment 7 Mark Lam 2019-07-11 09:36:54 PDT
(In reply to Yusuke Suzuki from comment #6)
> Committed r247346: <https://trac.webkit.org/changeset/247346>

To clarify, r247346 rolls out r243617.  r243617 is invalid.
Comment 8 David Kilzer (:ddkilzer) 2019-07-11 10:58:39 PDT
Radar tracking this rollout fix:

<rdar://problem/50484118>
Comment 9 David Kilzer (:ddkilzer) 2019-07-11 10:59:24 PDT
Oops, I was confused.  Back to:

<rdar://problem/49390987>