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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp

Issue 2552993002: Rename activeDOMObjectsAreStopped to isContextDestroyed (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file has been auto-generated by code_generator_v8.py. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // clang-format off 8 // clang-format off
9 9
10 #include "VoidCallbackFunctionModules.h" 10 #include "VoidCallbackFunctionModules.h"
(...skipping 18 matching lines...) Expand all
29 DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules) { 29 DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules) {
30 visitor->traceWrappers(m_callback.cast<v8::Value>()); 30 visitor->traceWrappers(m_callback.cast<v8::Value>());
31 } 31 }
32 32
33 bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) { 33 bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) {
34 if (!m_scriptState->contextIsValid()) 34 if (!m_scriptState->contextIsValid())
35 return false; 35 return false;
36 36
37 ExecutionContext* context = m_scriptState->getExecutionContext(); 37 ExecutionContext* context = m_scriptState->getExecutionContext();
38 DCHECK(context); 38 DCHECK(context);
39 if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreSto pped()) 39 if (context->activeDOMObjectsAreSuspended() || context->isContextDestroyed())
40 return false; 40 return false;
41 41
42 if (m_callback.isEmpty()) 42 if (m_callback.isEmpty())
43 return false; 43 return false;
44 44
45 // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. 45 // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK.
46 // crbug.com/653769 46 // crbug.com/653769
47 DummyExceptionStateForTesting exceptionState; 47 DummyExceptionStateForTesting exceptionState;
48 ScriptState::Scope scope(m_scriptState.get()); 48 ScriptState::Scope scope(m_scriptState.get());
49 49
50 v8::Local<v8::Value> thisValue = toV8(scriptWrappable, m_scriptState->context( )->Global(), m_scriptState->isolate()); 50 v8::Local<v8::Value> thisValue = toV8(scriptWrappable, m_scriptState->context( )->Global(), m_scriptState->isolate());
51 51
52 v8::Local<v8::Value> *argv = nullptr; 52 v8::Local<v8::Value> *argv = nullptr;
53 53
54 v8::Local<v8::Value> v8ReturnValue; 54 v8::Local<v8::Value> v8ReturnValue;
55 v8::TryCatch exceptionCatcher(m_scriptState->isolate()); 55 v8::TryCatch exceptionCatcher(m_scriptState->isolate());
56 exceptionCatcher.SetVerbose(true); 56 exceptionCatcher.SetVerbose(true);
57 57
58 if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()) , m_scriptState->getExecutionContext(), thisValue, 0, argv, m_scriptState->isola te()).ToLocal(&v8ReturnValue)) { 58 if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()) , m_scriptState->getExecutionContext(), thisValue, 0, argv, m_scriptState->isola te()).ToLocal(&v8ReturnValue)) {
59 return true; 59 return true;
60 } 60 }
61 return false; 61 return false;
62 } 62 }
63 63
64 } // namespace blink 64 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698