Reviewers: Kasper Lund,

Description:
Merge r2642 to branches/1.1.

Please review this at http://codereview.chromium.org/165126

SVN Base: http://v8.googlecode.com/svn/branches/1.1/

Affected files:
   M     src/api.cc
   M     src/execution.cc


Index: src/api.cc
===================================================================
--- src/api.cc  (revision 2644)
+++ src/api.cc  (working copy)
@@ -2373,7 +2373,7 @@


  const char* v8::V8::GetVersion() {
-  return "1.1.10.15";
+  return "1.1.10.16";
  }


Index: src/execution.cc
===================================================================
--- src/execution.cc    (revision 2644)
+++ src/execution.cc    (working copy)
@@ -78,6 +78,14 @@
      code = stub.GetCode();
    }

+  // Convert calls on global objects to be calls on the global
+  // receiver instead to avoid having a 'this' pointer which refers
+  // directly to a global object.
+  if (receiver->IsGlobalObject()) {
+    Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver);
+    receiver = Handle<JSObject>(global->global_receiver());
+  }
+
    {
      // Save and restore context around invocation and block the
      // allocation of handles without explicit handle scopes.



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to