Permalink
Browse files

Made a difference between implicit (__proto__) and explicit (prototyp…

…e) prototypal link
  • Loading branch information...
1 parent 4886779 commit 2eeb6d243128473e011ae0d222845a62ce61bc8b @vjeux committed May 28, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/constructors.h
  2. +2 −2 src/operators.h
View
@@ -110,7 +110,7 @@ Object New(Object o) {
n.s->f5 = o.s->f5;
n.self = &n;
- n["prototype"] = o["prototype"];
+ n["__proto__"] = o["prototype"];
return n;
}
View
@@ -260,8 +260,8 @@ std::string Object::toString() {
Object& Object::get_key(std::string key) {
Object& ret = s->map[key];
- if (ret == undefined && s->map["prototype"] != undefined) {
- return s->map["prototype"].get_key(key);
+ if (ret == undefined && s->map["__proto__"] != undefined) {
+ return s->map["__proto__"].get_key(key);
}
return ret;
}

0 comments on commit 2eeb6d2

Please sign in to comment.