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

Unified Diff: test/cctest/cctest.h

Issue 10959038: Supported sourceURL comments for scripts having a name. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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
===================================================================
--- test/cctest/cctest.h (revision 12571)
+++ test/cctest/cctest.h (working copy)
@@ -213,5 +213,16 @@
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