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

Unified Diff: test/cctest/cctest.h

Issue 10966011: Supported sourceURL comments for scripts having a name. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Comments addressed: changed method comment and added a test. Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/messages.js ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index 0b935622163d42c35071df0248db65db9093058e..4e8b7324d46639420b193eec8cae48db282b579f 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -213,5 +213,16 @@ static inline v8::Local<v8::Value> CompileRun(const char* source) {
return v8::Script::Compile(v8::String::New(source))->Run();
}
+// Helper function that compiles and runs the source with given origin.
+static inline v8::Local<v8::Value> CompileRunWithOrigin(const char* source,
+ const char* origin_url,
+ int line_number,
+ int column_number) {
+ v8::ScriptOrigin origin(v8::String::New(origin_url),
+ v8::Integer::New(line_number),
+ v8::Integer::New(column_number));
+ return v8::Script::Compile(v8::String::New(source), &origin)->Run();
+}
+
#endif // ifndef CCTEST_H_
« no previous file with comments | « src/messages.js ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698