Commit d746dbfe authored by adamk's avatar adamk Committed by Commit bot

[api] Delete non-maybe version of CompileModule

Also add a bigger warning to the header comment for the Maybe version.

R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1276353003

Cr-Commit-Position: refs/heads/master@{#30137}
parent 5df7d689
...@@ -1385,15 +1385,13 @@ class V8_EXPORT ScriptCompiler { ...@@ -1385,15 +1385,13 @@ class V8_EXPORT ScriptCompiler {
/** /**
* Compile an ES6 module. * Compile an ES6 module.
* *
* This is an experimental feature. * This is an unfinished experimental feature, and is only exposed
* here for internal testing purposes.
* Only parsing works at the moment. Do not use.
* *
* TODO(adamk): Script is likely the wrong return value for this; * TODO(adamk): Script is likely the wrong return value for this;
* should return some new Module type. * should return some new Module type.
*/ */
static V8_DEPRECATE_SOON(
"Use maybe version",
Local<Script> CompileModule(Isolate* isolate, Source* source,
CompileOptions options = kNoCompileOptions));
static V8_WARN_UNUSED_RESULT MaybeLocal<Script> CompileModule( static V8_WARN_UNUSED_RESULT MaybeLocal<Script> CompileModule(
Local<Context> context, Source* source, Local<Context> context, Source* source,
CompileOptions options = kNoCompileOptions); CompileOptions options = kNoCompileOptions);
......
...@@ -1807,13 +1807,6 @@ MaybeLocal<Script> ScriptCompiler::CompileModule(Local<Context> context, ...@@ -1807,13 +1807,6 @@ MaybeLocal<Script> ScriptCompiler::CompileModule(Local<Context> context,
} }
Local<Script> ScriptCompiler::CompileModule(Isolate* v8_isolate, Source* source,
CompileOptions options) {
auto context = v8_isolate->GetCurrentContext();
RETURN_TO_LOCAL_UNCHECKED(CompileModule(context, source, options), Script);
}
class IsIdentifierHelper { class IsIdentifierHelper {
public: public:
IsIdentifierHelper() : is_identifier_(false), first_char_(true) {} IsIdentifierHelper() : is_identifier_(false), first_char_(true) {}
......
...@@ -406,14 +406,6 @@ static inline v8::MaybeLocal<v8::Value> CompileRun( ...@@ -406,14 +406,6 @@ static inline v8::MaybeLocal<v8::Value> CompileRun(
} }
// Compiles source as an ES6 module.
static inline v8::Local<v8::Value> CompileRunModule(const char* source) {
v8::ScriptCompiler::Source script_source(v8_str(source));
return v8::ScriptCompiler::CompileModule(v8::Isolate::GetCurrent(),
&script_source)->Run();
}
static inline v8::Local<v8::Value> CompileRun(v8::Local<v8::String> source) { static inline v8::Local<v8::Value> CompileRun(v8::Local<v8::String> source) {
return v8::Script::Compile(source)->Run(); return v8::Script::Compile(source)->Run();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment