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

Side by Side Diff: src/api.cc

Issue 1804693002: Remove --harmony-modules flag and let embedder decide when modules are used (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/d8.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1846 Source* source, 1846 Source* source,
1847 CompileOptions options) { 1847 CompileOptions options) {
1848 auto context = v8_isolate->GetCurrentContext(); 1848 auto context = v8_isolate->GetCurrentContext();
1849 RETURN_TO_LOCAL_UNCHECKED(Compile(context, source, options), Script); 1849 RETURN_TO_LOCAL_UNCHECKED(Compile(context, source, options), Script);
1850 } 1850 }
1851 1851
1852 1852
1853 MaybeLocal<Script> ScriptCompiler::CompileModule(Local<Context> context, 1853 MaybeLocal<Script> ScriptCompiler::CompileModule(Local<Context> context,
1854 Source* source, 1854 Source* source,
1855 CompileOptions options) { 1855 CompileOptions options) {
1856 CHECK(i::FLAG_harmony_modules);
1857 auto isolate = context->GetIsolate(); 1856 auto isolate = context->GetIsolate();
1858 TRACE_EVENT_SCOPED_CONTEXT("V8", "Isolate", isolate); 1857 TRACE_EVENT_SCOPED_CONTEXT("V8", "Isolate", isolate);
1859 auto maybe = CompileUnboundInternal(isolate, source, options, true); 1858 auto maybe = CompileUnboundInternal(isolate, source, options, true);
1860 Local<UnboundScript> generic; 1859 Local<UnboundScript> generic;
1861 if (!maybe.ToLocal(&generic)) return MaybeLocal<Script>(); 1860 if (!maybe.ToLocal(&generic)) return MaybeLocal<Script>();
1862 v8::Context::Scope scope(context); 1861 v8::Context::Scope scope(context);
1863 return generic->BindToCurrentContext(); 1862 return generic->BindToCurrentContext();
1864 } 1863 }
1865 1864
1866 1865
(...skipping 6827 matching lines...) Expand 10 before | Expand all | Expand 10 after
8694 Address callback_address = 8693 Address callback_address =
8695 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8694 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8696 VMState<EXTERNAL> state(isolate); 8695 VMState<EXTERNAL> state(isolate);
8697 ExternalCallbackScope call_scope(isolate, callback_address); 8696 ExternalCallbackScope call_scope(isolate, callback_address);
8698 callback(info); 8697 callback(info);
8699 } 8698 }
8700 8699
8701 8700
8702 } // namespace internal 8701 } // namespace internal
8703 } // namespace v8 8702 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/d8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698