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

Side by Side Diff: Source/bindings/templates/callback_interface.cpp

Issue 209713003: Make DOMWrapperWorld::current() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/templates/interface.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 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}}. DO NOT MODIFY! 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 {% filter conditional(conditional_string) %} 8 {% filter conditional(conditional_string) %}
9 #include "{{v8_class}}.h" 9 #include "{{v8_class}}.h"
10 10
(...skipping 18 matching lines...) Expand all
29 {% for method in methods if not method.custom %} 29 {% for method in methods if not method.custom %}
30 {{method.cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_declarations | join(', ')}}) 30 {{method.cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_declarations | join(', ')}})
31 { 31 {
32 {% set return_default = 'return true' 32 {% set return_default = 'return true'
33 if method.idl_type == 'boolean' else 'return' %}{# void #} 33 if method.idl_type == 'boolean' else 'return' %}{# void #}
34 if (!canInvokeCallback()) 34 if (!canInvokeCallback())
35 {{return_default}}; 35 {{return_default}};
36 36
37 v8::HandleScope handleScope(m_isolate); 37 v8::HandleScope handleScope(m_isolate);
38 38
39 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world. get()); 39 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world );
40 if (v8Context.IsEmpty()) 40 if (v8Context.IsEmpty())
41 {{return_default}}; 41 {{return_default}};
42 42
43 v8::Context::Scope scope(v8Context); 43 v8::Context::Scope scope(v8Context);
44 {% if method.call_with_this_handle %} 44 {% if method.call_with_this_handle %}
45 v8::Handle<v8::Value> thisHandle = thisValue.v8Value(); 45 v8::Handle<v8::Value> thisHandle = thisValue.v8Value();
46 if (thisHandle.IsEmpty()) { 46 if (thisHandle.IsEmpty()) {
47 if (!isScriptControllerTerminating()) 47 if (!isScriptControllerTerminating())
48 CRASH(); 48 CRASH();
49 {{return_default}}; 49 {{return_default}};
(...skipping 18 matching lines...) Expand all
68 {% if method.idl_type == 'boolean' %} 68 {% if method.idl_type == 'boolean' %}
69 return invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_paramete r}}{{method.arguments | length}}, argv, executionContext(), m_isolate); 69 return invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_paramete r}}{{method.arguments | length}}, argv, executionContext(), m_isolate);
70 {% else %}{# void #} 70 {% else %}{# void #}
71 invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_parameter}}{{me thod.arguments | length}}, argv, executionContext(), m_isolate); 71 invokeCallback(m_callback.newLocal(m_isolate), {{this_handle_parameter}}{{me thod.arguments | length}}, argv, executionContext(), m_isolate);
72 {% endif %} 72 {% endif %}
73 } 73 }
74 74
75 {% endfor %} 75 {% endfor %}
76 } // namespace WebCore 76 } // namespace WebCore
77 {% endfilter %} 77 {% endfilter %}
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/templates/interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698