WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190302
Expose whether WKWebProcessPlugInNodeHandle is a select element to clients
https://bugs.webkit.org/show_bug.cgi?id=190302
Summary
Expose whether WKWebProcessPlugInNodeHandle is a select element to clients
Zach Li
Reported
2018-10-04 20:26:28 PDT
Expose whether WKWebProcessPlugInNodeHandle is a select element to clients
Attachments
Patch v1
(14.89 KB, patch)
2018-10-04 21:48 PDT
,
Zach Li
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Zach Li
Comment 1
2018-10-04 20:27:00 PDT
rdar://problem/45031469
Zach Li
Comment 2
2018-10-04 21:48:20 PDT
Created
attachment 351653
[details]
Patch v1
Tim Horton
Comment 3
2018-10-04 22:35:35 PDT
Comment on
attachment 351653
[details]
Patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=351653&action=review
> Tools/TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsSelectElement.mm:45 > + WKDOMElement *htmlElement = [document createElement:htmlElementTag];
I don’t know this API well enough; what’s the ownership story for this object returned from a -create method?
Zach Li
Comment 4
2018-10-04 23:10:10 PDT
(In reply to Tim Horton from
comment #3
)
> Comment on
attachment 351653
[details]
> Patch v1 > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=351653&action=review
> > > Tools/TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsSelectElement.mm:45 > > + WKDOMElement *htmlElement = [document createElement:htmlElementTag]; > > I don’t know this API well enough; what’s the ownership story for this > object returned from a -create method?
`htmlElement` holds a reference to the object and once the method returns, nothing holds a reference to the object and the object gets deallocated.
Tim Horton
Comment 5
2018-10-05 00:24:10 PDT
Comment on
attachment 351653
[details]
Patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=351653&action=review
>>> Tools/TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsSelectElement.mm:45 >>> + WKDOMElement *htmlElement = [document createElement:htmlElementTag]; >> >> I don’t know this API well enough; what’s the ownership story for this object returned from a -create method? > > `htmlElement` holds a reference to the object and once the method returns, nothing holds a reference to the object and the object gets deallocated.
No, that's not right, because this project doesn't build with ARC. However, I think the code is fine, because createElement returns an autoreleased object.
WebKit Commit Bot
Comment 6
2018-10-05 00:50:03 PDT
Comment on
attachment 351653
[details]
Patch v1 Clearing flags on attachment: 351653 Committed
r236869
: <
https://trac.webkit.org/changeset/236869
>
WebKit Commit Bot
Comment 7
2018-10-05 00:50:05 PDT
All reviewed patches have been landed. Closing bug.
Zach Li
Comment 8
2018-10-05 07:57:50 PDT
(In reply to Tim Horton from
comment #5
)
> Comment on
attachment 351653
[details]
> Patch v1 > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=351653&action=review
> > >>> Tools/TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsSelectElement.mm:45 > >>> + WKDOMElement *htmlElement = [document createElement:htmlElementTag]; > >> > >> I don’t know this API well enough; what’s the ownership story for this object returned from a -create method? > > > > `htmlElement` holds a reference to the object and once the method returns, nothing holds a reference to the object and the object gets deallocated. > > No, that's not right, because this project doesn't build with ARC.
Oh, I didn't know that is the case. Why is that?
> > However, I think the code is fine, because createElement returns an > autoreleased object.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug