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

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

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Patch Set: Created 6 years, 4 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
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 22 matching lines...) Expand all
33 #include "bindings/core/v8/V8ThrowException.h" 33 #include "bindings/core/v8/V8ThrowException.h"
34 #include "core/dom/ExecutionContext.h" 34 #include "core/dom/ExecutionContext.h"
35 #include "core/fetch/CachedMetadata.h" 35 #include "core/fetch/CachedMetadata.h"
36 #include "core/fetch/ScriptResource.h" 36 #include "core/fetch/ScriptResource.h"
37 #include "platform/TraceEvent.h" 37 #include "platform/TraceEvent.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 namespace { 41 namespace {
42 42
43 const int kMaxRecursionDepth = 22;
44
43 // 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
44 // v8::Function::Call, we don't call handleMaxRecursionDepthExceeded 46 // v8::Function::Call, we don't call handleMaxRecursionDepthExceeded
45 // directly. Instead, we create a v8::Function of 47 // directly. Instead, we create a v8::Function of
46 // throwStackOverflowException and call it. 48 // throwStackOverflowException and call it.
47 void throwStackOverflowException(const v8::FunctionCallbackInfo<v8::Value>& info ) 49 void throwStackOverflowException(const v8::FunctionCallbackInfo<v8::Value>& info )
48 { 50 {
49 V8ThrowException::throwRangeError("Maximum call stack size exceeded.", info. GetIsolate()); 51 V8ThrowException::throwRangeError("Maximum call stack size exceeded.", info. GetIsolate());
50 } 52 }
51 53
52 v8::Local<v8::Value> throwStackOverflowExceptionIfNeeded(v8::Isolate* isolate) 54 v8::Local<v8::Value> throwStackOverflowExceptionIfNeeded(v8::Isolate* isolate)
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 { 270 {
269 TRACE_EVENT0("v8", "v8.newInstance"); 271 TRACE_EVENT0("v8", "v8.newInstance");
270 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); 272 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
271 V8RecursionScope scope(isolate, context); 273 V8RecursionScope scope(isolate, context);
272 v8::Local<v8::Object> result = function->NewInstance(argc, argv); 274 v8::Local<v8::Object> result = function->NewInstance(argc, argv);
273 crashIfV8IsDead(); 275 crashIfV8IsDead();
274 return result; 276 return result;
275 } 277 }
276 278
277 } // namespace blink 279 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8Binding.h ('k') | Source/bindings/core/v8/custom/V8CanvasRenderingContext2DCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698