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

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

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

Powered by Google App Engine
This is Rietveld 408576698