WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
54036
didChangeBackForwardList should include some context about what changed
https://bugs.webkit.org/show_bug.cgi?id=54036
Summary
didChangeBackForwardList should include some context about what changed
Brady Eidson
Reported
2011-02-08 14:43:33 PST
In the WKPage loader client, didChangeBackForwardList should include some context about what changed. In radar as <
rdar://problem/8972913
>
Attachments
Patch v1
(9.65 KB, patch)
2011-02-08 14:47 PST
,
Brady Eidson
darin
: review+
beidson
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2011-02-08 14:47:48 PST
Created
attachment 81696
[details]
Patch v1
Darin Adler
Comment 2
2011-02-08 14:53:25 PST
Comment on
attachment 81696
[details]
Patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=81696&action=review
> Source/WebKit2/UIProcess/WebBackForwardList.cpp:67 > + Vector<RefPtr<APIObject> > removed;
I think removedItems would be a better name.
> Source/WebKit2/UIProcess/WebLoaderClient.cpp:214 > -void WebLoaderClient::didChangeBackForwardList(WebPageProxy* page) > +void WebLoaderClient::didChangeBackForwardList(WebPageProxy* page, WebBackForwardListItem* addedItem, Vector<RefPtr<APIObject> >* removedItems)
const Vector* would be better. Why APIObject in the vector instead of WebBackForwardListItem? Is that to make it work with ImmutableArray? Why RefPtr in the vector but not for addedItem? Could there be a race where addedItem needs to be ref'd too?
> Source/WebKit2/UIProcess/WebLoaderClient.cpp:219 > + RefPtr<ImmutableArray> removed;
removedItemsArray is probably a better name than "removed".
Brady Eidson
Comment 3
2011-02-08 15:02:18 PST
(In reply to
comment #2
)
> (From update of
attachment 81696
[details]
)
>
> > Source/WebKit2/UIProcess/WebLoaderClient.cpp:214 > > -void WebLoaderClient::didChangeBackForwardList(WebPageProxy* page) > > +void WebLoaderClient::didChangeBackForwardList(WebPageProxy* page, WebBackForwardListItem* addedItem, Vector<RefPtr<APIObject> >* removedItems) > > const Vector* would be better.
Can't, because ImmutableArray::adopt() actually inherits the vector buffer.
> Why APIObject in the vector instead of WebBackForwardListItem? Is that to make it work with ImmutableArray?
Yes - ImmutableArray is for WK* API vending, and it only knows how to adopt generic Vector<RefPtr<APIObject> >s.
> Why RefPtr in the vector but not for addedItem?
RefPtr<> in the Vector because that's what ImmutableArray works with.
> Could there be a race where addedItem needs to be ref'd too?
Nope, it's solidly reff'ed in the WebBackForwardList itself when this client call is made. Thanks!
Brady Eidson
Comment 4
2011-02-08 15:10:24 PST
r77978
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