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

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

Issue 293933002: Remove the Promises old implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « Source/bindings/v8/ScriptPromiseTest.cpp ('k') | Source/bindings/v8/custom/V8PromiseCustom.h » ('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 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";
171 v8::ResourceConstraints constraints; 169 v8::ResourceConstraints constraints;
172 constraints.ConfigureDefaults(static_cast<uint64_t>(blink::Platform::current ()->physicalMemoryMB()) << 20, static_cast<uint32_t>(blink::Platform::current()- >virtualMemoryLimitMB()) << 20, static_cast<uint32_t>(blink::Platform::current() ->numberOfProcessors())); 170 constraints.ConfigureDefaults(static_cast<uint64_t>(blink::Platform::current ()->physicalMemoryMB()) << 20, static_cast<uint32_t>(blink::Platform::current()- >virtualMemoryLimitMB()) << 20, static_cast<uint32_t>(blink::Platform::current() ->numberOfProcessors()));
173 v8::SetResourceConstraints(isolate, &constraints); 171 v8::SetResourceConstraints(isolate, &constraints);
174 172
175 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue); 173 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue);
176 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue); 174 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue);
177 v8::V8::SetFlagsFromString(promiseFlags, strlen(promiseFlags));
178 175
179 v8::Debug::SetLiveEditEnabled(isolate, false); 176 v8::Debug::SetLiveEditEnabled(isolate, false);
180 } 177 }
181 178
182 void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate) 179 void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate)
183 { 180 {
184 ASSERT(isMainThread()); 181 ASSERT(isMainThread());
185 182
186 static bool initialized = false; 183 static bool initialized = false;
187 if (initialized) 184 if (initialized)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 v8::V8::AddMessageListener(messageHandlerInWorker); 238 v8::V8::AddMessageListener(messageHandlerInWorker);
242 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); 239 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
243 240
244 v8::ResourceConstraints resourceConstraints; 241 v8::ResourceConstraints resourceConstraints;
245 uint32_t here; 242 uint32_t here;
246 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*)); 243 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin t32_t*));
247 v8::SetResourceConstraints(isolate, &resourceConstraints); 244 v8::SetResourceConstraints(isolate, &resourceConstraints);
248 } 245 }
249 246
250 } // namespace WebCore 247 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptPromiseTest.cpp ('k') | Source/bindings/v8/custom/V8PromiseCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698