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

Side by Side Diff: Source/bindings/v8/V8ScriptRunner.cpp

Issue 54283002: Rename |args| to |info| in V8 bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | « Source/bindings/v8/V8ScriptRunner.h ('k') | Source/bindings/v8/custom/V8BlobCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(source, fileNa me, scriptStartPosition, scriptData, isolate); 114 v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(source, fileNa me, scriptStartPosition, scriptData, isolate);
115 if (script.IsEmpty()) 115 if (script.IsEmpty())
116 return v8::Local<v8::Value>(); 116 return v8::Local<v8::Value>();
117 117
118 V8RecursionScope::MicrotaskSuppression recursionScope; 118 V8RecursionScope::MicrotaskSuppression recursionScope;
119 v8::Local<v8::Value> result = script->Run(); 119 v8::Local<v8::Value> result = script->Run();
120 crashIfV8IsDead(); 120 crashIfV8IsDead();
121 return result; 121 return result;
122 } 122 }
123 123
124 v8::Local<v8::Value> V8ScriptRunner::callFunction(v8::Handle<v8::Function> funct ion, ExecutionContext* context, v8::Handle<v8::Value> receiver, int argc, v8::Ha ndle<v8::Value> args[], v8::Isolate* isolate) 124 v8::Local<v8::Value> V8ScriptRunner::callFunction(v8::Handle<v8::Function> funct ion, ExecutionContext* context, v8::Handle<v8::Value> receiver, int argc, v8::Ha ndle<v8::Value> info[], v8::Isolate* isolate)
125 { 125 {
126 TRACE_EVENT0("v8", "v8.callFunction"); 126 TRACE_EVENT0("v8", "v8.callFunction");
127 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution"); 127 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution");
128 128
129 if (V8RecursionScope::recursionLevel() >= kMaxRecursionDepth) 129 if (V8RecursionScope::recursionLevel() >= kMaxRecursionDepth)
130 return handleMaxRecursionDepthExceeded(isolate); 130 return handleMaxRecursionDepthExceeded(isolate);
131 131
132 RELEASE_ASSERT(!context->isIteratingOverObservers()); 132 RELEASE_ASSERT(!context->isIteratingOverObservers());
133 133
134 V8RecursionScope recursionScope(context); 134 V8RecursionScope recursionScope(context);
135 v8::Local<v8::Value> result = function->Call(receiver, argc, args); 135 v8::Local<v8::Value> result = function->Call(receiver, argc, info);
136 crashIfV8IsDead(); 136 crashIfV8IsDead();
137 return result; 137 return result;
138 } 138 }
139 139
140 v8::Local<v8::Value> V8ScriptRunner::callInternalFunction(v8::Handle<v8::Functio n> function, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> arg s[], v8::Isolate* isolate) 140 v8::Local<v8::Value> V8ScriptRunner::callInternalFunction(v8::Handle<v8::Functio n> function, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> inf o[], v8::Isolate* isolate)
141 { 141 {
142 TRACE_EVENT0("v8", "v8.callFunction"); 142 TRACE_EVENT0("v8", "v8.callFunction");
143 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution"); 143 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution");
144 V8RecursionScope::MicrotaskSuppression recursionScope; 144 V8RecursionScope::MicrotaskSuppression recursionScope;
145 v8::Local<v8::Value> result = function->Call(receiver, argc, args); 145 v8::Local<v8::Value> result = function->Call(receiver, argc, info);
146 crashIfV8IsDead(); 146 crashIfV8IsDead();
147 return result; 147 return result;
148 } 148 }
149 149
150 v8::Local<v8::Value> V8ScriptRunner::callAsFunction(v8::Handle<v8::Object> objec t, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> args[]) 150 v8::Local<v8::Value> V8ScriptRunner::callAsFunction(v8::Handle<v8::Object> objec t, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> info[])
151 { 151 {
152 TRACE_EVENT0("v8", "v8.callFunction"); 152 TRACE_EVENT0("v8", "v8.callFunction");
153 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution"); 153 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution");
154 154
155 V8RecursionScope::MicrotaskSuppression recursionScope; 155 V8RecursionScope::MicrotaskSuppression recursionScope;
156 v8::Local<v8::Value> result = object->CallAsFunction(receiver, argc, args); 156 v8::Local<v8::Value> result = object->CallAsFunction(receiver, argc, info);
157 crashIfV8IsDead(); 157 crashIfV8IsDead();
158 return result; 158 return result;
159 } 159 }
160 160
161 v8::Local<v8::Value> V8ScriptRunner::callAsConstructor(v8::Handle<v8::Object> ob ject, int argc, v8::Handle<v8::Value> args[]) 161 v8::Local<v8::Value> V8ScriptRunner::callAsConstructor(v8::Handle<v8::Object> ob ject, int argc, v8::Handle<v8::Value> info[])
162 { 162 {
163 TRACE_EVENT0("v8", "v8.callFunction"); 163 TRACE_EVENT0("v8", "v8.callFunction");
164 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution"); 164 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution");
165 165
166 V8RecursionScope::MicrotaskSuppression recursionScope; 166 V8RecursionScope::MicrotaskSuppression recursionScope;
167 v8::Local<v8::Value> result = object->CallAsConstructor(argc, args); 167 v8::Local<v8::Value> result = object->CallAsConstructor(argc, info);
168 crashIfV8IsDead(); 168 crashIfV8IsDead();
169 return result; 169 return result;
170 } 170 }
171 171
172 v8::Local<v8::Object> V8ScriptRunner::instantiateObject(v8::Handle<v8::ObjectTem plate> objectTemplate) 172 v8::Local<v8::Object> V8ScriptRunner::instantiateObject(v8::Handle<v8::ObjectTem plate> objectTemplate)
173 { 173 {
174 TRACE_EVENT0("v8", "v8.newInstance"); 174 TRACE_EVENT0("v8", "v8.newInstance");
175 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution"); 175 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution");
176 176
177 V8RecursionScope::MicrotaskSuppression scope; 177 V8RecursionScope::MicrotaskSuppression scope;
(...skipping 17 matching lines...) Expand all
195 { 195 {
196 TRACE_EVENT0("v8", "v8.newInstance"); 196 TRACE_EVENT0("v8", "v8.newInstance");
197 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution"); 197 TRACE_EVENT_SCOPED_SAMPLING_STATE("V8", "Execution");
198 V8RecursionScope scope(context); 198 V8RecursionScope scope(context);
199 v8::Local<v8::Object> result = function->NewInstance(argc, argv); 199 v8::Local<v8::Object> result = function->NewInstance(argc, argv);
200 crashIfV8IsDead(); 200 crashIfV8IsDead();
201 return result; 201 return result;
202 } 202 }
203 203
204 } // namespace WebCore 204 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8ScriptRunner.h ('k') | Source/bindings/v8/custom/V8BlobCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698