Bug 159701 - Clean up PassRefPtr uses in Modules/encryptedmedia, Modules/speech, and Modules/quota
Summary: Clean up PassRefPtr uses in Modules/encryptedmedia, Modules/speech, and Modul...
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: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-12 23:09 PDT by Gyuyoung Kim
Modified: 2016-07-17 23:14 PDT (History)
1 user (show)

See Also:


Attachments
Patch (27.69 KB, patch)
2016-07-12 23:10 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (30.49 KB, patch)
2016-07-13 03:22 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (34.14 KB, patch)
2016-07-14 00:55 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (34.30 KB, patch)
2016-07-15 01:23 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews116 for mac-yosemite (1.52 MB, application/zip)
2016-07-16 22:03 PDT, Build Bot
no flags Details
Patch for landing (34.74 KB, patch)
2016-07-17 19:55 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2016-07-12 23:09:57 PDT
SSIA
Comment 1 Gyuyoung Kim 2016-07-12 23:10:51 PDT
Created attachment 283490 [details]
Patch
Comment 2 Gyuyoung Kim 2016-07-13 03:22:19 PDT
Created attachment 283501 [details]
Patch
Comment 3 Alex Christensen 2016-07-14 00:05:22 PDT
Comment on attachment 283501 [details]
Patch

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

> Source/WebCore/Modules/quota/StorageErrorCallback.cpp:45
> -StorageErrorCallback::CallbackTask::CallbackTask(PassRefPtr<StorageErrorCallback> callback, ExceptionCode ec)
> +StorageErrorCallback::CallbackTask::CallbackTask(StorageErrorCallback* callback, ExceptionCode ec)
>      : ScriptExecutionContext::Task([callback, ec] (ScriptExecutionContext*) {
>          if (callback)
>              callback->handleEvent(DOMCoreException::create(ExceptionCodeDescription(ec)).get());

This feels like it should be a RefPtr<StorageErrorCallback>&& that is WTFMoved into the lambda so we are sure there is still a reference when we call the callback.  Otherwise, it's not obvious that there couldn't be a use after free.

> Source/WebCore/Modules/speech/SpeechSynthesis.cpp:189
> +void SpeechSynthesis::boundaryEventOccurred(PlatformSpeechSynthesisUtterance* utterance, SpeechBoundary boundary, unsigned charIndex)

This should definitely be a PlatformSpeechSynthesisUtterance&

> Source/WebCore/Modules/speech/SpeechSynthesis.cpp:209
> +void SpeechSynthesis::didStartSpeaking(PlatformSpeechSynthesisUtterance* utterance)

ditto

> Source/WebCore/Modules/speech/SpeechSynthesis.cpp:215
> +void SpeechSynthesis::didPauseSpeaking(PlatformSpeechSynthesisUtterance* utterance)

ditto

> Source/WebCore/Modules/speech/SpeechSynthesis.cpp:235
> +void SpeechSynthesis::speakingErrorOccurred(PlatformSpeechSynthesisUtterance* utterance)

etc.

> Source/WebCore/Modules/speech/SpeechSynthesisVoice.h:53
>      RefPtr<PlatformSpeechSynthesisVoice> m_platformVoice;

This should be made a Ref.
Comment 4 Gyuyoung Kim 2016-07-14 00:55:21 PDT
Created attachment 283621 [details]
Patch
Comment 5 Gyuyoung Kim 2016-07-15 01:23:13 PDT
Created attachment 283748 [details]
Patch
Comment 6 Alex Christensen 2016-07-15 09:24:08 PDT
Comment on attachment 283748 [details]
Patch

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

> Source/WebCore/Modules/speech/SpeechSynthesisVoice.cpp:39
> +SpeechSynthesisVoice::SpeechSynthesisVoice(PlatformSpeechSynthesisVoice* voice)
> +    : m_platformVoice(adoptRef(*voice))

This should be a PlatformSpeechSynthesisVoice&.  PlatformSpeechSynthesizer.m_voiceList should be Refs.
Comment 7 Build Bot 2016-07-16 22:03:20 PDT
Comment on attachment 283748 [details]
Patch

Attachment 283748 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1694508

New failing tests:
transitions/default-timing-function.html
Comment 8 Build Bot 2016-07-16 22:03:23 PDT
Created attachment 283859 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Gyuyoung Kim 2016-07-17 19:55:49 PDT
Created attachment 283881 [details]
Patch for landing
Comment 10 Gyuyoung Kim 2016-07-17 22:53:30 PDT
Comment on attachment 283881 [details]
Patch for landing

Looks like win-ews is being failed regardless of this patch.
Comment 11 WebKit Commit Bot 2016-07-17 23:14:22 PDT
Comment on attachment 283881 [details]
Patch for landing

Clearing flags on attachment: 283881

Committed r203340: <http://trac.webkit.org/changeset/203340>
Comment 12 WebKit Commit Bot 2016-07-17 23:14:26 PDT
All reviewed patches have been landed.  Closing bug.