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

Side by Side Diff: Source/bindings/core/v8/PrivateScriptRunner.cpp

Issue 682883003: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptController.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 // 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 #include "config.h" 5 #include "config.h"
6 #include "bindings/core/v8/PrivateScriptRunner.h" 6 #include "bindings/core/v8/PrivateScriptRunner.h"
7 7
8 #include "bindings/core/v8/DOMWrapperWorld.h" 8 #include "bindings/core/v8/DOMWrapperWorld.h"
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 v8::TryCatch block; 46 v8::TryCatch block;
47 String sourceString(source, size); 47 String sourceString(source, size);
48 String fileName = scriptClassName + ".js"; 48 String fileName = scriptClassName + ".js";
49 v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(v8String(isola te, sourceString), fileName, TextPosition::minimumPosition(), 0, 0, isolate, Not SharableCrossOrigin, V8CacheOptionsOff); 49 v8::Handle<v8::Script> script = V8ScriptRunner::compileScript(v8String(isola te, sourceString), fileName, TextPosition::minimumPosition(), 0, 0, isolate, Not SharableCrossOrigin, V8CacheOptionsOff);
50 if (block.HasCaught()) { 50 if (block.HasCaught()) {
51 fprintf(stderr, "Private script error: Compile failed. (Class name = %s) \n", scriptClassName.utf8().data()); 51 fprintf(stderr, "Private script error: Compile failed. (Class name = %s) \n", scriptClassName.utf8().data());
52 dumpV8Message(block.Message()); 52 dumpV8Message(block.Message());
53 RELEASE_ASSERT_NOT_REACHED(); 53 RELEASE_ASSERT_NOT_REACHED();
54 } 54 }
55 55
56 v8::Handle<v8::Value> result = V8ScriptRunner::runCompiledInternalScript(scr ipt, isolate); 56 v8::Handle<v8::Value> result = V8ScriptRunner::runCompiledInternalScript(iso late, script);
57 if (block.HasCaught()) { 57 if (block.HasCaught()) {
58 fprintf(stderr, "Private script error: installClass() failed. (Class nam e = %s)\n", scriptClassName.utf8().data()); 58 fprintf(stderr, "Private script error: installClass() failed. (Class nam e = %s)\n", scriptClassName.utf8().data());
59 dumpV8Message(block.Message()); 59 dumpV8Message(block.Message());
60 RELEASE_ASSERT_NOT_REACHED(); 60 RELEASE_ASSERT_NOT_REACHED();
61 } 61 }
62 return result; 62 return result;
63 } 63 }
64 64
65 // FIXME: If we have X.js, XPartial-1.js and XPartial-2.js, currently all of the JS files 65 // FIXME: If we have X.js, XPartial-1.js and XPartial-2.js, currently all of the JS files
66 // are compiled when any of the JS files is requested. Ideally we should avoid c ompiling 66 // are compiled when any of the JS files is requested. Ideally we should avoid c ompiling
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 v8::Handle<v8::Value> result = V8ScriptRunner::callFunction(v8::Handle<v8::F unction>::Cast(method), scriptState->executionContext(), holder, argc, argv, scr iptState->isolate()); 294 v8::Handle<v8::Value> result = V8ScriptRunner::callFunction(v8::Handle<v8::F unction>::Cast(method), scriptState->executionContext(), holder, argc, argv, scr iptState->isolate());
295 if (block.HasCaught()) { 295 if (block.HasCaught()) {
296 rethrowExceptionInPrivateScript(scriptState->isolate(), block, scriptSta teInUserScript, ExceptionState::ExecutionContext, methodName, className); 296 rethrowExceptionInPrivateScript(scriptState->isolate(), block, scriptSta teInUserScript, ExceptionState::ExecutionContext, methodName, className);
297 block.ReThrow(); 297 block.ReThrow();
298 return v8::Handle<v8::Value>(); 298 return v8::Handle<v8::Value>();
299 } 299 }
300 return result; 300 return result;
301 } 301 }
302 302
303 } // namespace blink 303 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698