| OLD | NEW |
| 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 "config.h" | 5 #include "config.h" |
| 6 #include "bindings/core/v8/RejectedPromises.h" | 6 #include "bindings/core/v8/RejectedPromises.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScopedPersistent.h" | 8 #include "bindings/core/v8/ScopedPersistent.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/ScriptValue.h" | 10 #include "bindings/core/v8/ScriptValue.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::
create(JSMessageSource, ErrorMessageLevel, embedderErrorMessage, m_resourceName,
m_lineNumber, m_columnNumber); | 88 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::
create(JSMessageSource, ErrorMessageLevel, embedderErrorMessage, m_resourceName,
m_lineNumber, m_columnNumber); |
| 89 consoleMessage->setScriptArguments(arguments); | 89 consoleMessage->setScriptArguments(arguments); |
| 90 consoleMessage->setCallStack(m_callStack); | 90 consoleMessage->setCallStack(m_callStack); |
| 91 consoleMessage->setScriptId(m_scriptId); | 91 consoleMessage->setScriptId(m_scriptId); |
| 92 m_consoleMessageId = consoleMessage->assignMessageId(); | 92 m_consoleMessageId = consoleMessage->assignMessageId(); |
| 93 executionContext->addConsoleMessage(consoleMessage.release()); | 93 executionContext->addConsoleMessage(consoleMessage.release()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 m_callStack.clear(); | 96 m_callStack.clear(); |
| 97 m_exception.clear(); |
| 97 } | 98 } |
| 98 | 99 |
| 99 void revoke() | 100 void revoke() |
| 100 { | 101 { |
| 101 ExecutionContext* executionContext = m_scriptState->executionContext(); | 102 ExecutionContext* executionContext = m_scriptState->executionContext(); |
| 102 if (!executionContext) | 103 if (!executionContext) |
| 103 return; | 104 return; |
| 104 | 105 |
| 105 ScriptState::Scope scope(m_scriptState); | 106 ScriptState::Scope scope(m_scriptState); |
| 106 v8::Local<v8::Value> value = m_promise.newLocal(m_scriptState->isolate()
); | 107 v8::Local<v8::Value> value = m_promise.newLocal(m_scriptState->isolate()
); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 continue; | 222 continue; |
| 222 | 223 |
| 223 message->report(); | 224 message->report(); |
| 224 m_reportedAsErrors.append(message.release()); | 225 m_reportedAsErrors.append(message.release()); |
| 225 if (m_reportedAsErrors.size() > maxReportedHandlersPendingResolution) | 226 if (m_reportedAsErrors.size() > maxReportedHandlersPendingResolution) |
| 226 m_reportedAsErrors.remove(0, maxReportedHandlersPendingResolution /
10); | 227 m_reportedAsErrors.remove(0, maxReportedHandlersPendingResolution /
10); |
| 227 } | 228 } |
| 228 } | 229 } |
| 229 | 230 |
| 230 } // namespace blink | 231 } // namespace blink |
| OLD | NEW |