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

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

Issue 692443002: 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 | « Source/bindings/core/v8/V8Binding.cpp ('k') | Source/bindings/core/v8/V8ThrowException.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 /* 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 30 matching lines...) Expand all
41 namespace blink { 41 namespace blink {
42 42
43 namespace { 43 namespace {
44 44
45 // In order to make sure all pending messages to be processed in 45 // In order to make sure all pending messages to be processed in
46 // v8::Function::Call, we don't call handleMaxRecursionDepthExceeded 46 // v8::Function::Call, we don't call handleMaxRecursionDepthExceeded
47 // directly. Instead, we create a v8::Function of 47 // directly. Instead, we create a v8::Function of
48 // throwStackOverflowException and call it. 48 // throwStackOverflowException and call it.
49 void throwStackOverflowException(const v8::FunctionCallbackInfo<v8::Value>& info ) 49 void throwStackOverflowException(const v8::FunctionCallbackInfo<v8::Value>& info )
50 { 50 {
51 V8ThrowException::throwRangeError("Maximum call stack size exceeded.", info. GetIsolate()); 51 V8ThrowException::throwRangeError(info.GetIsolate(), "Maximum call stack siz e exceeded.");
52 } 52 }
53 53
54 v8::Local<v8::Value> throwStackOverflowExceptionIfNeeded(v8::Isolate* isolate) 54 v8::Local<v8::Value> throwStackOverflowExceptionIfNeeded(v8::Isolate* isolate)
55 { 55 {
56 if (V8PerIsolateData::from(isolate)->isHandlingRecursionLevelError()) { 56 if (V8PerIsolateData::from(isolate)->isHandlingRecursionLevelError()) {
57 // If we are already handling a recursion level error, we should 57 // If we are already handling a recursion level error, we should
58 // not invoke v8::Function::Call. 58 // not invoke v8::Function::Call.
59 return v8::Undefined(isolate); 59 return v8::Undefined(isolate);
60 } 60 }
61 V8PerIsolateData::from(isolate)->setIsHandlingRecursionLevelError(true); 61 V8PerIsolateData::from(isolate)->setIsHandlingRecursionLevelError(true);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 { 290 {
291 return StringHash::hash(v8::V8::GetVersion()) * 2; 291 return StringHash::hash(v8::V8::GetVersion()) * 2;
292 } 292 }
293 293
294 unsigned V8ScriptRunner::tagForCodeCache() 294 unsigned V8ScriptRunner::tagForCodeCache()
295 { 295 {
296 return StringHash::hash(v8::V8::GetVersion()) * 2 + 1; 296 return StringHash::hash(v8::V8::GetVersion()) * 2 + 1;
297 } 297 }
298 298
299 } // namespace blink 299 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8Binding.cpp ('k') | Source/bindings/core/v8/V8ThrowException.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698