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

Unified Diff: src/runtime.cc

Issue 11359130: Make formatting error message side-effect-free. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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/runtime.h ('k') | test/mjsunit/regress/regress-2398.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index fb40d5e73e3c3dd85b15165c88487f6d893cbd5f..3129c930a2e2fcc751271f59865e2c81186f301c 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -4238,6 +4238,27 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DefineOrRedefineDataProperty) {
}
+// Return property without being observable by accessors or interceptors.
+RUNTIME_FUNCTION(MaybeObject*, Runtime_GetDataProperty) {
+ ASSERT(args.length() == 2);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
+ CONVERT_ARG_HANDLE_CHECKED(String, key, 1);
+ LookupResult lookup(isolate);
+ object->LookupRealNamedProperty(*key, &lookup);
+ if (!lookup.IsProperty()) return isolate->heap()->undefined_value();
Sven Panne 2012/11/12 10:14:00 With the change below, this can change to ...!look
+ switch (lookup.type()) {
+ case NORMAL:
+ return lookup.holder()->GetNormalizedProperty(&lookup);
+ case FIELD:
+ return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex());
+ case CONSTANT_FUNCTION:
+ return lookup.GetConstantFunction();
+ default:
Sven Panne 2012/11/12 10:14:00 Please explicitly list all PropertyTypes. We shoul
+ return isolate->heap()->undefined_value();
+ }
+}
+
+
MaybeObject* Runtime::SetObjectProperty(Isolate* isolate,
Handle<Object> object,
Handle<Object> key,
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/regress/regress-2398.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698