Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp

Issue 2012203002: Rename OwnPtr::clear() to reset(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase for landing. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/OwnPtr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/RejectedPromises.h" 5 #include "bindings/core/v8/RejectedPromises.h"
6 6
7 #include "bindings/core/v8/ScopedPersistent.h" 7 #include "bindings/core/v8/ScopedPersistent.h"
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (embedderErrorMessage.isEmpty()) 83 if (embedderErrorMessage.isEmpty())
84 embedderErrorMessage = errorMessage; 84 embedderErrorMessage = errorMessage;
85 else if (embedderErrorMessage.startsWith("Uncaught ")) 85 else if (embedderErrorMessage.startsWith("Uncaught "))
86 embedderErrorMessage.insert(" (in promise)", 8); 86 embedderErrorMessage.insert(" (in promise)", 8);
87 87
88 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSou rce, ErrorMessageLevel, embedderErrorMessage, std::move(m_location), arguments); 88 ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSou rce, ErrorMessageLevel, embedderErrorMessage, std::move(m_location), arguments);
89 m_consoleMessageId = consoleMessage->assignMessageId(); 89 m_consoleMessageId = consoleMessage->assignMessageId();
90 executionContext->addConsoleMessage(consoleMessage); 90 executionContext->addConsoleMessage(consoleMessage);
91 } 91 }
92 92
93 m_location.clear(); 93 m_location.reset();
94 } 94 }
95 95
96 void revoke() 96 void revoke()
97 { 97 {
98 ExecutionContext* executionContext = m_scriptState->getExecutionContext( ); 98 ExecutionContext* executionContext = m_scriptState->getExecutionContext( );
99 if (!executionContext) 99 if (!executionContext)
100 return; 100 return;
101 101
102 ScriptState::Scope scope(m_scriptState); 102 ScriptState::Scope scope(m_scriptState);
103 v8::Local<v8::Value> value = m_promise.newLocal(m_scriptState->isolate() ); 103 v8::Local<v8::Value> value = m_promise.newLocal(m_scriptState->isolate() );
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } 265 }
266 } 266 }
267 } 267 }
268 268
269 void RejectedPromises::revokeNow(PassOwnPtr<Message> message) 269 void RejectedPromises::revokeNow(PassOwnPtr<Message> message)
270 { 270 {
271 message->revoke(); 271 message->revoke();
272 } 272 }
273 273
274 } // namespace blink 274 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/OwnPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698