| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 29 #include "bindings/core/v8/ScriptSourceCode.h" | 29 #include "bindings/core/v8/ScriptSourceCode.h" |
| 30 #include "bindings/core/v8/V8Binding.h" | 30 #include "bindings/core/v8/V8Binding.h" |
| 31 #include "bindings/core/v8/V8GCController.h" | 31 #include "bindings/core/v8/V8GCController.h" |
| 32 #include "bindings/core/v8/V8RecursionScope.h" | 32 #include "bindings/core/v8/V8RecursionScope.h" |
| 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 WebCore { | 39 namespace blink { |
| 40 | 40 |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 // In order to make sure all pending messages to be processed in | 43 // In order to make sure all pending messages to be processed in |
| 44 // v8::Function::Call, we don't call handleMaxRecursionDepthExceeded | 44 // v8::Function::Call, we don't call handleMaxRecursionDepthExceeded |
| 45 // directly. Instead, we create a v8::Function of | 45 // directly. Instead, we create a v8::Function of |
| 46 // throwStackOverflowException and call it. | 46 // throwStackOverflowException and call it. |
| 47 void throwStackOverflowException(const v8::FunctionCallbackInfo<v8::Value>& info
) | 47 void throwStackOverflowException(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 48 { | 48 { |
| 49 throwError(v8RangeError, "Maximum call stack size exceeded.", info.GetIsolat
e()); | 49 throwError(v8RangeError, "Maximum call stack size exceeded.", info.GetIsolat
e()); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 v8::Local<v8::Object> V8ScriptRunner::instantiateObjectInDocument(v8::Isolate* i
solate, v8::Handle<v8::Function> function, ExecutionContext* context, int argc,
v8::Handle<v8::Value> argv[]) | 215 v8::Local<v8::Object> V8ScriptRunner::instantiateObjectInDocument(v8::Isolate* i
solate, v8::Handle<v8::Function> function, ExecutionContext* context, int argc,
v8::Handle<v8::Value> argv[]) |
| 216 { | 216 { |
| 217 TRACE_EVENT0("v8", "v8.newInstance"); | 217 TRACE_EVENT0("v8", "v8.newInstance"); |
| 218 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); | 218 TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution"); |
| 219 V8RecursionScope scope(isolate, context); | 219 V8RecursionScope scope(isolate, context); |
| 220 v8::Local<v8::Object> result = function->NewInstance(argc, argv); | 220 v8::Local<v8::Object> result = function->NewInstance(argc, argv); |
| 221 crashIfV8IsDead(); | 221 crashIfV8IsDead(); |
| 222 return result; | 222 return result; |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace WebCore | 225 } // namespace blink |
| OLD | NEW |