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

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

Issue 2811833002: Move ScriptState::GetExecutionContext (Part 2) (Closed)
Patch Set: Add 2 sp Created 3 years, 8 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 | « third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
10 10
(...skipping 27 matching lines...) Expand all
38 visitor->TraceWrappers(m_callback.Cast<v8::Value>()); 38 visitor->TraceWrappers(m_callback.Cast<v8::Value>());
39 } 39 }
40 40
41 bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) { 41 bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) {
42 if (m_callback.IsEmpty()) 42 if (m_callback.IsEmpty())
43 return false; 43 return false;
44 44
45 if (!m_scriptState->ContextIsValid()) 45 if (!m_scriptState->ContextIsValid())
46 return false; 46 return false;
47 47
48 ExecutionContext* context = m_scriptState->GetExecutionContext(); 48 ExecutionContext* context = ExecutionContext::From(m_scriptState.Get());
49 DCHECK(context); 49 DCHECK(context);
50 if (context->IsContextSuspended() || context->IsContextDestroyed()) 50 if (context->IsContextSuspended() || context->IsContextDestroyed())
51 return false; 51 return false;
52 52
53 // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. 53 // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK.
54 // crbug.com/653769 54 // crbug.com/653769
55 DummyExceptionStateForTesting exceptionState; 55 DummyExceptionStateForTesting exceptionState;
56 ScriptState::Scope scope(m_scriptState.Get()); 56 ScriptState::Scope scope(m_scriptState.Get());
57 v8::Isolate* isolate = m_scriptState->GetIsolate(); 57 v8::Isolate* isolate = m_scriptState->GetIsolate();
58 58
(...skipping 20 matching lines...) Expand all
79 } 79 }
80 80
81 VoidCallbackFunctionModules* NativeValueTraits<VoidCallbackFunctionModules>::Nat iveValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& excep tionState) { 81 VoidCallbackFunctionModules* NativeValueTraits<VoidCallbackFunctionModules>::Nat iveValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& excep tionState) {
82 VoidCallbackFunctionModules* nativeValue = VoidCallbackFunctionModules::Create (ScriptState::Current(isolate), value); 82 VoidCallbackFunctionModules* nativeValue = VoidCallbackFunctionModules::Create (ScriptState::Current(isolate), value);
83 if (!nativeValue) 83 if (!nativeValue)
84 exceptionState.ThrowTypeError("Unable to convert value to VoidCallbackFuncti onModules."); 84 exceptionState.ThrowTypeError("Unable to convert value to VoidCallbackFuncti onModules.");
85 return nativeValue; 85 return nativeValue;
86 } 86 }
87 87
88 } // namespace blink 88 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698