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

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

Issue 209853010: [ABANDONED] Enable V8 Promises (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 { 159 {
160 if (!status) { 160 if (!status) {
161 TRACE_EVENT_BEGIN0("V8", name); 161 TRACE_EVENT_BEGIN0("V8", name);
162 } else { 162 } else {
163 TRACE_EVENT_END0("V8", name); 163 TRACE_EVENT_END0("V8", name);
164 } 164 }
165 } 165 }
166 166
167 static void initializeV8Common(v8::Isolate* isolate) 167 static void initializeV8Common(v8::Isolate* isolate)
168 { 168 {
169 // FIXME: This is a temporary flags and should be removed soon.
170 const char promiseFlags[] = "--harmony-promises";
169 v8::ResourceConstraints constraints; 171 v8::ResourceConstraints constraints;
170 constraints.ConfigureDefaults(static_cast<uint64_t>(blink::Platform::current ()->physicalMemoryMB()) << 20, static_cast<uint32_t>(blink::Platform::current()- >numberOfProcessors())); 172 constraints.ConfigureDefaults(static_cast<uint64_t>(blink::Platform::current ()->physicalMemoryMB()) << 20, static_cast<uint32_t>(blink::Platform::current()- >numberOfProcessors()));
171 v8::SetResourceConstraints(isolate, &constraints); 173 v8::SetResourceConstraints(isolate, &constraints);
172 174
173 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue); 175 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue);
174 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue); 176 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue);
177 v8::V8::SetFlagsFromString(promiseFlags, strlen(promiseFlags));
175 178
176 v8::Debug::SetLiveEditEnabled(false); 179 v8::Debug::SetLiveEditEnabled(false);
177 } 180 }
178 181
179 void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate) 182 void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate)
180 { 183 {
181 ASSERT(isMainThread()); 184 ASSERT(isMainThread());
182 185
183 static bool initialized = false; 186 static bool initialized = false;
184 if (initialized) 187 if (initialized)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 v8::V8::AddMessageListener(messageHandlerInWorker); 241 v8::V8::AddMessageListener(messageHandlerInWorker);
239 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); 242 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
240 243
241 v8::ResourceConstraints resourceConstraints; 244 v8::ResourceConstraints resourceConstraints;
242 uint32_t here; 245 uint32_t here;
243 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*)); 246 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*));
244 v8::SetResourceConstraints(isolate, &resourceConstraints); 247 v8::SetResourceConstraints(isolate, &resourceConstraints);
245 } 248 }
246 249
247 } // namespace WebCore 250 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698