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

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

Issue 23477075: Rename isolateFor*() utility functions to toIsolate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 {% endif %} 36 {% endif %}
37 #include "{{v8_class_name}}.h" 37 #include "{{v8_class_name}}.h"
38 38
39 {% for filename in cpp_includes %} 39 {% for filename in cpp_includes %}
40 #include "{{filename}}" 40 #include "{{filename}}"
41 {% endfor %} 41 {% endfor %}
42 namespace WebCore { 42 namespace WebCore {
43 43
44 {{v8_class_name}}::{{v8_class_name}}(v8::Handle<v8::Object> callback, ScriptExec utionContext* context) 44 {{v8_class_name}}::{{v8_class_name}}(v8::Handle<v8::Object> callback, ScriptExec utionContext* context)
45 : ActiveDOMCallback(context) 45 : ActiveDOMCallback(context)
46 , m_callback(isolateForScriptExecutionContext(context), callback) 46 , m_callback(toIsolate(context), callback)
47 , m_world(DOMWrapperWorld::current()) 47 , m_world(DOMWrapperWorld::current())
48 { 48 {
49 } 49 }
50 50
51 {{v8_class_name}}::~{{v8_class_name}}() 51 {{v8_class_name}}::~{{v8_class_name}}()
52 { 52 {
53 } 53 }
54 54
55 {% for method in methods %} 55 {% for method in methods %}
56 {% if not method.custom %} 56 {% if not method.custom %}
(...skipping 29 matching lines...) Expand all
86 return !invokeCallback(m_callback.newLocal(isolate), {{method.arguments | le ngth}}, argv, callbackReturnValue, scriptExecutionContext(), isolate); 86 return !invokeCallback(m_callback.newLocal(isolate), {{method.arguments | le ngth}}, argv, callbackReturnValue, scriptExecutionContext(), isolate);
87 } 87 }
88 88
89 {% endif %} 89 {% endif %}
90 {% endfor %}{# for method in methods #} 90 {% endfor %}{# for method in methods #}
91 } // namespace WebCore 91 } // namespace WebCore
92 92
93 {% if conditional_string %} 93 {% if conditional_string %}
94 #endif // {{conditional_string}} 94 #endif // {{conditional_string}}
95 {% endif %} 95 {% endif %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/deprecated_code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698