| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 v8::Local<v8::Promise> promise = data.GetPromise(); | 225 v8::Local<v8::Promise> promise = data.GetPromise(); |
| 226 v8::Isolate* isolate = promise->GetIsolate(); | 226 v8::Isolate* isolate = promise->GetIsolate(); |
| 227 ExecutionContext* context = scriptState->getExecutionContext(); | 227 ExecutionContext* context = scriptState->getExecutionContext(); |
| 228 | 228 |
| 229 v8::Local<v8::Value> exception = data.GetValue(); | 229 v8::Local<v8::Value> exception = data.GetValue(); |
| 230 if (V8DOMWrapper::isWrapper(isolate, exception)) { | 230 if (V8DOMWrapper::isWrapper(isolate, exception)) { |
| 231 // Try to get the stack & location from a wrapped exception object (e.g. | 231 // Try to get the stack & location from a wrapped exception object (e.g. |
| 232 // DOMException). | 232 // DOMException). |
| 233 ASSERT(exception->IsObject()); | 233 ASSERT(exception->IsObject()); |
| 234 auto privateError = V8PrivateProperty::getDOMExceptionError(isolate); | 234 auto privateError = V8PrivateProperty::getDOMExceptionError(isolate); |
| 235 v8::Local<v8::Value> error = privateError.getOrUndefined( | 235 v8::Local<v8::Value> error = |
| 236 scriptState->context(), exception.As<v8::Object>()); | 236 privateError.getOrUndefined(exception.As<v8::Object>()); |
| 237 if (!error->IsUndefined()) | 237 if (!error->IsUndefined()) |
| 238 exception = error; | 238 exception = error; |
| 239 } | 239 } |
| 240 | 240 |
| 241 String errorMessage; | 241 String errorMessage; |
| 242 AccessControlStatus corsStatus = NotSharableCrossOrigin; | 242 AccessControlStatus corsStatus = NotSharableCrossOrigin; |
| 243 std::unique_ptr<SourceLocation> location; | 243 std::unique_ptr<SourceLocation> location; |
| 244 | 244 |
| 245 v8::Local<v8::Message> message = | 245 v8::Local<v8::Message> message = |
| 246 v8::Exception::CreateMessage(isolate, exception); | 246 v8::Exception::CreateMessage(isolate, exception); |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 v8::Isolate::kMessageLog); | 577 v8::Isolate::kMessageLog); |
| 578 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); | 578 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); |
| 579 | 579 |
| 580 uint32_t here; | 580 uint32_t here; |
| 581 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - | 581 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - |
| 582 kWorkerMaxStackSize); | 582 kWorkerMaxStackSize); |
| 583 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 583 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 584 } | 584 } |
| 585 | 585 |
| 586 } // namespace blink | 586 } // namespace blink |
| OLD | NEW |