| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 v8::Local<v8::Value> data) { | 109 v8::Local<v8::Value> data) { |
| 110 if (V8DOMWrapper::isWrapper(isolate, data)) { | 110 if (V8DOMWrapper::isWrapper(isolate, data)) { |
| 111 v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(data); | 111 v8::Local<v8::Object> obj = v8::Local<v8::Object>::Cast(data); |
| 112 const WrapperTypeInfo* type = toWrapperTypeInfo(obj); | 112 const WrapperTypeInfo* type = toWrapperTypeInfo(obj); |
| 113 if (V8DOMException::wrapperTypeInfo.isSubclass(type)) { | 113 if (V8DOMException::wrapperTypeInfo.isSubclass(type)) { |
| 114 DOMException* exception = V8DOMException::toImpl(obj); | 114 DOMException* exception = V8DOMException::toImpl(obj); |
| 115 if (exception && !exception->messageForConsole().isEmpty()) | 115 if (exception && !exception->messageForConsole().isEmpty()) |
| 116 return exception->toStringForConsole(); | 116 return exception->toStringForConsole(); |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 return emptyString(); | 119 return emptyString; |
| 120 } | 120 } |
| 121 | 121 |
| 122 namespace { | 122 namespace { |
| 123 MessageLevel MessageLevelFromNonFatalErrorLevel(int errorLevel) { | 123 MessageLevel MessageLevelFromNonFatalErrorLevel(int errorLevel) { |
| 124 MessageLevel level = ErrorMessageLevel; | 124 MessageLevel level = ErrorMessageLevel; |
| 125 switch (errorLevel) { | 125 switch (errorLevel) { |
| 126 case v8::Isolate::kMessageDebug: | 126 case v8::Isolate::kMessageDebug: |
| 127 level = VerboseMessageLevel; | 127 level = VerboseMessageLevel; |
| 128 break; | 128 break; |
| 129 case v8::Isolate::kMessageLog: | 129 case v8::Isolate::kMessageLog: |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 v8::Isolate::kMessageLog); | 520 v8::Isolate::kMessageLog); |
| 521 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 521 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
| 522 | 522 |
| 523 uint32_t here; | 523 uint32_t here; |
| 524 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - | 524 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - |
| 525 kWorkerMaxStackSize); | 525 kWorkerMaxStackSize); |
| 526 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 526 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 527 } | 527 } |
| 528 | 528 |
| 529 } // namespace blink | 529 } // namespace blink |
| OLD | NEW |