| Index: test/cctest/cctest.h
|
| diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
|
| index 1d70c0e8aea4dcb773381c30eb89a012099d4fd0..e111438cdf7de109e3834dfeba6a41a1fa9a1e9c 100644
|
| --- a/test/cctest/cctest.h
|
| +++ b/test/cctest/cctest.h
|
| @@ -389,6 +389,14 @@ static inline v8::Local<v8::Value> CompileRun(const char* source) {
|
| }
|
|
|
|
|
| +// 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();
|
| }
|
|
|