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

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

Issue 181843003: Don't ignore OOM exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 9 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/V8Binding.cpp ('k') | Source/bindings/v8/V8ScriptRunner.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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 static void initializeV8Common(v8::Isolate* isolate) 154 static void initializeV8Common(v8::Isolate* isolate)
155 { 155 {
156 v8::ResourceConstraints constraints; 156 v8::ResourceConstraints constraints;
157 constraints.ConfigureDefaults(static_cast<uint64_t>(blink::Platform::current ()->physicalMemoryMB()) << 20, static_cast<uint32_t>(blink::Platform::current()- >numberOfProcessors())); 157 constraints.ConfigureDefaults(static_cast<uint64_t>(blink::Platform::current ()->physicalMemoryMB()) << 20, static_cast<uint32_t>(blink::Platform::current()- >numberOfProcessors()));
158 v8::SetResourceConstraints(isolate, &constraints); 158 v8::SetResourceConstraints(isolate, &constraints);
159 159
160 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue); 160 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue);
161 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue); 161 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue);
162 v8::V8::IgnoreOutOfMemoryException();
163 162
164 v8::Debug::SetLiveEditEnabled(false); 163 v8::Debug::SetLiveEditEnabled(false);
165 } 164 }
166 165
167 void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate) 166 void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate)
168 { 167 {
169 ASSERT(isMainThread()); 168 ASSERT(isMainThread());
170 169
171 static bool initialized = false; 170 static bool initialized = false;
172 if (initialized) 171 if (initialized)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 v8::V8::AddMessageListener(messageHandlerInWorker); 222 v8::V8::AddMessageListener(messageHandlerInWorker);
224 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); 223 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
225 224
226 v8::ResourceConstraints resourceConstraints; 225 v8::ResourceConstraints resourceConstraints;
227 uint32_t here; 226 uint32_t here;
228 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*)); 227 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*));
229 v8::SetResourceConstraints(isolate, &resourceConstraints); 228 v8::SetResourceConstraints(isolate, &resourceConstraints);
230 } 229 }
231 230
232 } // namespace WebCore 231 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Binding.cpp ('k') | Source/bindings/v8/V8ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698