[api] Delete non-maybe version of CompileModule
authoradamk <adamk@chromium.org>
Wed, 12 Aug 2015 16:43:06 +0000 (09:43 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 12 Aug 2015 16:43:17 +0000 (16:43 +0000)
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}

include/v8.h
src/api.cc
test/cctest/cctest.h

index 34eff3f..71a1805 100644 (file)
@@ -1385,15 +1385,13 @@ class V8_EXPORT ScriptCompiler {
   /**
    * 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;
    * 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(
       Local<Context> context, Source* source,
       CompileOptions options = kNoCompileOptions);
index 40151f2..4f98293 100644 (file)
@@ -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 {
  public:
   IsIdentifierHelper() : is_identifier_(false), first_char_(true) {}
index c712286..a7096f8 100644 (file)
@@ -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) {
   return v8::Script::Compile(source)->Run();
 }