Merge V8 5.3.332.45.  DO NOT MERGE

Test: Manual

FPIIM-449

Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
(cherry picked from commit 13e2dadd00298019ed862f2b2fc5068bba730bcf)
diff --git a/tools/detect-builtins.js b/tools/detect-builtins.js
index 2a476ba..90bdc08 100644
--- a/tools/detect-builtins.js
+++ b/tools/detect-builtins.js
@@ -24,6 +24,8 @@
       }
       // Avoid endless recursion.
       if (this_name === "prototype" && name === "constructor") continue;
+      // Avoid needless duplication.
+      if (this_name === "__PROTO__" && name === "constructor") continue;
       // Could get this from the parent, but having it locally is easier.
       var property = { "name": name };
       try {
@@ -39,9 +41,18 @@
         property.length = value.length;
         property.prototype = GetProperties("prototype", value.prototype);
       }
-      property.properties = GetProperties(name, value);
+      if (type === "string" || type === "number") {
+        property.value = value;
+      } else {
+        property.properties = GetProperties(name, value);
+      }
       result[name] = property;
     }
+    // Print the __proto__ if it's not the default Object prototype.
+    if (typeof object === "object" && object.__proto__ !== null &&
+        !object.__proto__.hasOwnProperty("__proto__")) {
+      result.__PROTO__ = GetProperties("__PROTO__", object.__proto__);
+    }
     return result;
   };