Revision: 21695
Author:   [email protected]
Date:     Thu Jun  5 13:02:18 2014 UTC
Log:      Compilation API: next step of deprecations.

Remove deprecated functions and deprecated Script::GetId (which was supposed to
be deprecated, but Chrome was using it).

[email protected], [email protected]
BUG=

Review URL: https://codereview.chromium.org/315003003
http://code.google.com/p/v8/source/detail?r=21695

Modified:
 /branches/bleeding_edge/include/v8.h
 /branches/bleeding_edge/test/cctest/test-api.cc
 /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc
 /branches/bleeding_edge/test/cctest/test-debug.cc
 /branches/bleeding_edge/test/cctest/test-profile-generator.cc

=======================================
--- /branches/bleeding_edge/include/v8.h        Thu Jun  5 08:44:42 2014 UTC
+++ /branches/bleeding_edge/include/v8.h        Thu Jun  5 13:02:18 2014 UTC
@@ -984,24 +984,9 @@
    */
   Local<UnboundScript> GetUnboundScript();

-  // To be deprecated; use GetUnboundScript()->GetId();
-  int GetId() {
-    return GetUnboundScript()->GetId();
-  }
-
-  // Use GetUnboundScript()->GetId();
   V8_DEPRECATED("Use GetUnboundScript()->GetId()",
-                Handle<Value> GetScriptName()) {
-    return GetUnboundScript()->GetScriptName();
-  }
-
-  /**
-   * Returns zero based line number of the code_pos location in the script.
-   * -1 will be returned if no information available.
-   */
-  V8_DEPRECATED("Use GetUnboundScript()->GetLineNumber()",
-                int GetLineNumber(int code_pos)) {
-    return GetUnboundScript()->GetLineNumber(code_pos);
+                int GetId()) {
+    return GetUnboundScript()->GetId();
   }
 };

@@ -1046,8 +1031,7 @@
   };

   /**
-   * Source code which can be then compiled to a UnboundScript or
-   * BoundScript.
+   * Source code which can be then compiled to a UnboundScript or Script.
    */
   class Source {
    public:
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Tue Jun 3 20:12:19 2014 UTC +++ /branches/bleeding_edge/test/cctest/test-api.cc Thu Jun 5 13:02:18 2014 UTC
@@ -17545,7 +17545,7 @@
   script->Run();
   for (int i = 0; i < 2; i++) {
     CHECK(scriptIdInStack[i] != v8::Message::kNoScriptIdInfo);
-    CHECK_EQ(scriptIdInStack[i], script->GetId());
+    CHECK_EQ(scriptIdInStack[i], script->GetUnboundScript()->GetId());
   }
 }

@@ -18476,8 +18476,8 @@
       env->Global()->Get(v8::String::NewFromUtf8(isolate, "foo")));
   v8::Local<v8::Function> bar = v8::Local<v8::Function>::Cast(
       env->Global()->Get(v8::String::NewFromUtf8(isolate, "bar")));
-  CHECK_EQ(script->GetId(), foo->ScriptId());
-  CHECK_EQ(script->GetId(), bar->ScriptId());
+  CHECK_EQ(script->GetUnboundScript()->GetId(), foo->ScriptId());
+  CHECK_EQ(script->GetUnboundScript()->GetId(), bar->ScriptId());
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Tue Jun 3 08:12:43 2014 UTC +++ /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Thu Jun 5 13:02:18 2014 UTC
@@ -1623,16 +1623,16 @@
       ProfileGenerator::kAnonymousFunctionName);
   CheckFunctionDetails(env->GetIsolate(), script,
ProfileGenerator::kAnonymousFunctionName, "script_b",
-                       script_b->GetId(), 1, 1);
+                       script_b->GetUnboundScript()->GetId(), 1, 1);
const v8::CpuProfileNode* baz = GetChild(env->GetIsolate(), script, "baz");
   CheckFunctionDetails(env->GetIsolate(), baz, "baz", "script_b",
-                       script_b->GetId(), 3, 16);
+                       script_b->GetUnboundScript()->GetId(), 3, 16);
   const v8::CpuProfileNode* foo = GetChild(env->GetIsolate(), baz, "foo");
   CheckFunctionDetails(env->GetIsolate(), foo, "foo", "script_a",
-                       script_a->GetId(), 2, 1);
+                       script_a->GetUnboundScript()->GetId(), 2, 1);
   const v8::CpuProfileNode* bar = GetChild(env->GetIsolate(), foo, "bar");
   CheckFunctionDetails(env->GetIsolate(), bar, "bar", "script_a",
-                       script_a->GetId(), 3, 14);
+                       script_a->GetUnboundScript()->GetId(), 3, 14);
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Tue Jun 3 08:12:43 2014 UTC +++ /branches/bleeding_edge/test/cctest/test-debug.cc Thu Jun 5 13:02:18 2014 UTC
@@ -1638,7 +1638,7 @@
       env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "g")));

   // Get the script id knowing that internally it is a 32 integer.
-  int script_id = script->GetId();
+  int script_id = script->GetUnboundScript()->GetId();

   // Call f and g without break points.
   break_point_hit_count = 0;
=======================================
--- /branches/bleeding_edge/test/cctest/test-profile-generator.cc Tue Jun 3 08:12:43 2014 UTC +++ /branches/bleeding_edge/test/cctest/test-profile-generator.cc Thu Jun 5 13:02:18 2014 UTC
@@ -662,11 +662,11 @@

   current = PickChild(current, "b");
   CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
-  CHECK_EQ(script_b->GetId(), current->GetScriptId());
+  CHECK_EQ(script_b->GetUnboundScript()->GetId(), current->GetScriptId());

   current = PickChild(current, "a");
   CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
-  CHECK_EQ(script_a->GetId(), current->GetScriptId());
+  CHECK_EQ(script_a->GetUnboundScript()->GetId(), current->GetScriptId());
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to