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

Unified Diff: src/api.cc

Issue 40317: Added unique id to all scripts (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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/accessors.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
===================================================================
--- src/api.cc (revision 1464)
+++ src/api.cc (working copy)
@@ -1054,6 +1054,22 @@
}
+Local<Value> Script::Id() {
+ ON_BAILOUT("v8::Script::Id()", return Local<Value>());
+ LOG_API("Script::Id");
+ i::Object* raw_id = NULL;
+ {
+ HandleScope scope;
+ i::Handle<i::JSFunction> fun = Utils::OpenHandle(this);
+ i::Handle<i::Script> script(i::Script::cast(fun->shared()->script()));
+ i::Handle<i::Object> id(script->id());
+ raw_id = *id;
+ }
+ i::Handle<i::Object> id(raw_id);
+ return Utils::ToLocal(id);
+}
+
+
// --- E x c e p t i o n s ---
« no previous file with comments | « src/accessors.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698