| 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 30 matching lines...) Expand all Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |