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

Side by Side Diff: Source/bindings/v8/V8Initializer.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8EventListenerList.cpp ('k') | Source/bindings/v8/V8ValueCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 200 v8::Isolate* isolate = v8::Isolate::GetCurrent();
201 // During the frame teardown, there may not be a valid context. 201 // During the frame teardown, there may not be a valid context.
202 if (ExecutionContext* context = currentExecutionContext(isolate)) { 202 if (ExecutionContext* context = currentExecutionContext(isolate)) {
203 String errorMessage = toCoreString(message->Get()); 203 String errorMessage = toCoreString(message->Get());
204 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, sourceURL, mess age->GetScriptResourceName()); 204 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, sourceURL, mess age->GetScriptResourceName());
205 205
206 RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, m essage->GetLineNumber(), message->GetStartColumn() + 1, DOMWrapperWorld::current (isolate)); 206 RefPtr<ErrorEvent> event = ErrorEvent::create(errorMessage, sourceURL, m essage->GetLineNumber(), message->GetStartColumn() + 1, DOMWrapperWorld::current (isolate));
207 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? Sharab leCrossOrigin : NotSharableCrossOrigin; 207 AccessControlStatus corsStatus = message->IsSharedCrossOrigin() ? Sharab leCrossOrigin : NotSharableCrossOrigin;
208 208
209 V8ErrorHandler::storeExceptionOnErrorEventWrapper(event.get(), data, iso late); 209 V8ErrorHandler::storeExceptionOnErrorEventWrapper(event.get(), data, iso late);
210 context->reportException(event.release(), 0, corsStatus); 210 context->reportException(event.release(), nullptr, corsStatus);
211 } 211 }
212 212
213 isReportingException = false; 213 isReportingException = false;
214 } 214 }
215 215
216 static const int kWorkerMaxStackSize = 500 * 1024; 216 static const int kWorkerMaxStackSize = 500 * 1024;
217 217
218 void V8Initializer::initializeWorker(v8::Isolate* isolate) 218 void V8Initializer::initializeWorker(v8::Isolate* isolate)
219 { 219 {
220 initializeV8Common(isolate); 220 initializeV8Common(isolate);
221 221
222 v8::V8::AddMessageListener(messageHandlerInWorker); 222 v8::V8::AddMessageListener(messageHandlerInWorker);
223 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); 223 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
224 224
225 v8::ResourceConstraints resourceConstraints; 225 v8::ResourceConstraints resourceConstraints;
226 uint32_t here; 226 uint32_t here;
227 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*)); 227 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*));
228 v8::SetResourceConstraints(isolate, &resourceConstraints); 228 v8::SetResourceConstraints(isolate, &resourceConstraints);
229 } 229 }
230 230
231 } // namespace WebCore 231 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8EventListenerList.cpp ('k') | Source/bindings/v8/V8ValueCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698