Bug 144098

Summary: Some media tests assert after r183096
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, esprehn+autocc, kangil.han, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch.
none
Another patch. none

Description Eric Carlson 2015-04-23 06:33:19 PDT
The assertion added to Document::removePlaybackTargetPickerClient in r183096 is too aggressive, it it not an error for it to be called more than once.
Comment 1 Eric Carlson 2015-04-23 06:34:06 PDT
<rdar://problem/20661179>
Comment 2 Eric Carlson 2015-04-23 06:58:23 PDT
Created attachment 251431 [details]
Proposed patch.
Comment 3 Darin Adler 2015-04-23 08:10:50 PDT
Comment on attachment 251431 [details]
Proposed patch.

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

> Source/WebCore/dom/Document.cpp:6553
> +    const auto& it = m_clientToIDMap.find(&client);

Best type to use here is probably auto rather than const auto&. Same thing below.

> Source/WebCore/dom/Document.cpp:6559
>      m_clientToIDMap.remove(&client);

This should be remove(it), not remove(&client); passing &client results in a second hash table lookup.
Comment 4 Eric Carlson 2015-04-23 09:00:23 PDT
Committed r183187 and r183187 - https://trac.webkit.org/r183185, https://trac.webkit.org/r183187
Comment 5 Eric Carlson 2015-04-23 09:01:01 PDT
By which I meant r183185 and r183187 of course.
Comment 6 Eric Carlson 2015-04-29 11:57:44 PDT
Reopened, test still occasionally crash.
Comment 7 Eric Carlson 2015-04-29 12:07:08 PDT
Created attachment 251974 [details]
Another patch.
Comment 8 Brent Fulgham 2015-04-29 13:52:19 PDT
Comment on attachment 251974 [details]
Another patch.

r=me
Comment 9 WebKit Commit Bot 2015-04-29 14:45:29 PDT
Comment on attachment 251974 [details]
Another patch.

Clearing flags on attachment: 251974

Committed r183578: <http://trac.webkit.org/changeset/183578>
Comment 10 WebKit Commit Bot 2015-04-29 14:45:35 PDT
All reviewed patches have been landed.  Closing bug.