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

Unified Diff: src/objects.cc

Issue 155085: Separate native and interpreted regexp by compile time flag, not runtime. (Closed)
Patch Set: Addressed review comments. Adapted builds scripts. Created 11 years, 5 months 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/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index d69134c470faac46f7ed6e9d6b5e8e7942ded462..ee0ac2d0ca496d0801e817ced13c740ac1f4cc3c 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5825,10 +5825,11 @@ Object* JSObject::GetPropertyPostInterceptor(JSObject* receiver,
}
-Object* JSObject::GetPropertyWithInterceptorProper(
+bool JSObject::GetPropertyWithInterceptorProper(
JSObject* receiver,
String* name,
- PropertyAttributes* attributes) {
+ PropertyAttributes* attributes,
+ Object** result_object) {
HandleScope scope;
Handle<InterceptorInfo> interceptor(GetNamedInterceptor());
Handle<JSObject> receiver_handle(receiver);
@@ -5849,14 +5850,17 @@ Object* JSObject::GetPropertyWithInterceptorProper(
VMState state(EXTERNAL);
result = getter(v8::Utils::ToLocal(name_handle), info);
}
- if (!Top::has_scheduled_exception() && !result.IsEmpty()) {
+ if (Top::has_scheduled_exception()) {
+ return false;
+ }
+ if (!result.IsEmpty()) {
*attributes = NONE;
- return *v8::Utils::OpenHandle(*result);
+ *result_object = *v8::Utils::OpenHandle(*result);
+ return true;
}
}
- *attributes = ABSENT;
- return Heap::undefined_value();
+ return false;
}
@@ -5870,13 +5874,12 @@ Object* JSObject::GetInterceptorPropertyWithLookupHint(
Handle<JSObject> holder_handle(this);
Handle<String> name_handle(name);
- Object* result = GetPropertyWithInterceptorProper(receiver,
- name,
- attributes);
- if (*attributes != ABSENT) {
+ Object* result = NULL;
+ if (GetPropertyWithInterceptorProper(receiver, name, attributes, &result)) {
return result;
+ } else {
+ RETURN_IF_SCHEDULED_EXCEPTION();
}
- RETURN_IF_SCHEDULED_EXCEPTION();
int property_index = lookup_hint->value();
if (property_index >= 0) {
@@ -5921,11 +5924,12 @@ Object* JSObject::GetPropertyWithInterceptor(
Handle<JSObject> holder_handle(this);
Handle<String> name_handle(name);
- Object* result = GetPropertyWithInterceptorProper(receiver, name, attributes);
- if (*attributes != ABSENT) {
+ Object* result = NULL;
+ if (GetPropertyWithInterceptorProper(receiver, name, attributes, &result)) {
return result;
+ } else {
+ RETURN_IF_SCHEDULED_EXCEPTION();
}
- RETURN_IF_SCHEDULED_EXCEPTION();
result = holder_handle->GetPropertyPostInterceptor(
*receiver_handle,
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698