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

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

Issue 1853743005: Oilpan: Remove WillBe types (part 13) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 else if (message->IsSharedCrossOrigin()) 150 else if (message->IsSharedCrossOrigin())
151 accessControlStatus = SharableCrossOrigin; 151 accessControlStatus = SharableCrossOrigin;
152 152
153 ScriptState* scriptState = ScriptState::current(isolate); 153 ScriptState* scriptState = ScriptState::current(isolate);
154 String errorMessage = toCoreStringWithNullCheck(message->Get()); 154 String errorMessage = toCoreStringWithNullCheck(message->Get());
155 int lineNumber = 0; 155 int lineNumber = 0;
156 int columnNumber = 0; 156 int columnNumber = 0;
157 if (v8Call(message->GetLineNumber(scriptState->context()), lineNumber) 157 if (v8Call(message->GetLineNumber(scriptState->context()), lineNumber)
158 && v8Call(message->GetStartColumn(scriptState->context()), columnNumber) ) 158 && v8Call(message->GetStartColumn(scriptState->context()), columnNumber) )
159 ++columnNumber; 159 ++columnNumber;
160 RefPtrWillBeRawPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, reso urceName, lineNumber, columnNumber, &scriptState->world()); 160 RawPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, resourceName, li neNumber, columnNumber, &scriptState->world());
161 161
162 String messageForConsole = extractMessageForConsole(isolate, data); 162 String messageForConsole = extractMessageForConsole(isolate, data);
163 if (!messageForConsole.isEmpty()) 163 if (!messageForConsole.isEmpty())
164 event->setUnsanitizedMessage("Uncaught " + messageForConsole); 164 event->setUnsanitizedMessage("Uncaught " + messageForConsole);
165 165
166 // This method might be called while we're creating a new context. In this c ase, we 166 // This method might be called while we're creating a new context. In this c ase, we
167 // avoid storing the exception object, as we can't create a wrapper during c ontext creation. 167 // avoid storing the exception object, as we can't create a wrapper during c ontext creation.
168 // FIXME: Can we even get here during initialization now that we bail out wh en GetEntered returns an empty handle? 168 // FIXME: Can we even get here during initialization now that we bail out wh en GetEntered returns an empty handle?
169 LocalFrame* frame = enteredWindow->document()->frame(); 169 LocalFrame* frame = enteredWindow->document()->frame();
170 if (frame && frame->script().existingWindowProxy(scriptState->world())) { 170 if (frame && frame->script().existingWindowProxy(scriptState->world())) {
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 String errorMessage = toCoreStringWithNullCheck(message->Get()); 423 String errorMessage = toCoreStringWithNullCheck(message->Get());
424 TOSTRING_VOID(V8StringResource<>, sourceURL, message->GetScriptOrigin(). ResourceName()); 424 TOSTRING_VOID(V8StringResource<>, sourceURL, message->GetScriptOrigin(). ResourceName());
425 int scriptId = 0; 425 int scriptId = 0;
426 RefPtr<ScriptCallStack> callStack = extractCallStack(isolate, message, & scriptId); 426 RefPtr<ScriptCallStack> callStack = extractCallStack(isolate, message, & scriptId);
427 427
428 int lineNumber = 0; 428 int lineNumber = 0;
429 int columnNumber = 0; 429 int columnNumber = 0;
430 if (v8Call(message->GetLineNumber(scriptState->context()), lineNumber) 430 if (v8Call(message->GetLineNumber(scriptState->context()), lineNumber)
431 && v8Call(message->GetStartColumn(scriptState->context()), columnNum ber)) 431 && v8Call(message->GetStartColumn(scriptState->context()), columnNum ber))
432 ++columnNumber; 432 ++columnNumber;
433 RefPtrWillBeRawPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, lineNumber, columnNumber, &DOMWrapperWorld::current(isolate)); 433 RawPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, l ineNumber, columnNumber, &DOMWrapperWorld::current(isolate));
434 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? Sharab leCrossOrigin : NotSharableCrossOrigin; 434 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? Sharab leCrossOrigin : NotSharableCrossOrigin;
435 435
436 // If execution termination has been triggered as part of constructing 436 // If execution termination has been triggered as part of constructing
437 // the error event from the v8::Message, quietly leave. 437 // the error event from the v8::Message, quietly leave.
438 if (!isolate->IsExecutionTerminating()) { 438 if (!isolate->IsExecutionTerminating()) {
439 V8ErrorHandler::storeExceptionOnErrorEventWrapper(scriptState, event .get(), data, scriptState->context()->Global()); 439 V8ErrorHandler::storeExceptionOnErrorEventWrapper(scriptState, event .get(), data, scriptState->context()->Global());
440 context->reportException(event.release(), scriptId, callStack, corsS tatus); 440 context->reportException(event.release(), scriptId, callStack, corsS tatus);
441 } 441 }
442 } 442 }
443 443
(...skipping 12 matching lines...) Expand all
456 456
457 isolate->AddMessageListener(messageHandlerInWorker); 457 isolate->AddMessageListener(messageHandlerInWorker);
458 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 458 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
459 459
460 uint32_t here; 460 uint32_t here;
461 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*))); 461 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*)));
462 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 462 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
463 } 463 }
464 464
465 } // namespace blink 465 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698