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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 2785943002: [Bindings] Simplify V8PrivateProperty::Symbol methods (Closed)
Patch Set: work for comments Created 3 years, 8 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698