Revision: 17050
Author: [email protected]
Date: Tue Oct 1 14:53:45 2013 UTC
Log: Remove obsolete AssertNoContextChangeWithHandleScope.
[email protected]
Review URL: https://codereview.chromium.org/25513002
http://code.google.com/p/v8/source/detail?r=17050
Modified:
/branches/bleeding_edge/src/isolate.h
/branches/bleeding_edge/src/objects.cc
=======================================
--- /branches/bleeding_edge/src/isolate.h Tue Oct 1 14:26:53 2013 UTC
+++ /branches/bleeding_edge/src/isolate.h Tue Oct 1 14:53:45 2013 UTC
@@ -1419,9 +1419,9 @@
class AssertNoContextChange BASE_EMBEDDED {
#ifdef DEBUG
public:
- AssertNoContextChange()
- : isolate_(Isolate::Current()),
- context_(isolate_->context()) { }
+ explicit AssertNoContextChange(Isolate* isolate)
+ : isolate_(isolate),
+ context_(isolate->context(), isolate) { }
~AssertNoContextChange() {
ASSERT(isolate_->context() == *context_);
}
@@ -1431,32 +1431,7 @@
Handle<Context> context_;
#else
public:
- AssertNoContextChange() { }
-#endif
-};
-
-
-// TODO(mstarzinger): Depracate as soon as everything is handlified.
-class AssertNoContextChangeWithHandleScope BASE_EMBEDDED {
-#ifdef DEBUG
- public:
- AssertNoContextChangeWithHandleScope() :
- isolate_(Isolate::Current()),
- scope_(isolate_),
- context_(isolate_->context(), isolate_) {
- }
-
- ~AssertNoContextChangeWithHandleScope() {
- ASSERT(isolate_->context() == *context_);
- }
-
- private:
- Isolate* isolate_;
- HandleScope scope_;
- Handle<Context> context_;
-#else
- public:
- AssertNoContextChangeWithHandleScope() { }
+ explicit AssertNoContextChange(Isolate* isolate) { }
#endif
};
=======================================
--- /branches/bleeding_edge/src/objects.cc Tue Oct 1 14:26:15 2013 UTC
+++ /branches/bleeding_edge/src/objects.cc Tue Oct 1 14:53:45 2013 UTC
@@ -807,12 +807,18 @@
LookupResult* result,
Name* name,
PropertyAttributes* attributes) {
+ Isolate* isolate = name->GetIsolate();
+ Heap* heap = isolate->heap();
+
+#ifdef DEBUG
+ // TODO(mstarzinger): Only because of the AssertNoContextChange, drop as
soon
+ // as this method has been fully handlified.
+ HandleScope scope(isolate);
+#endif
+
// Make sure that the top context does not change when doing
// callbacks or interceptor calls.
- AssertNoContextChangeWithHandleScope ncc;
-
- Isolate* isolate = name->GetIsolate();
- Heap* heap = isolate->heap();
+ AssertNoContextChange ncc(isolate);
// Traverse the prototype chain from the current object (this) to
// the holder and check for access rights. This avoids traversing the
@@ -3910,7 +3916,7 @@
// Make sure that the top context does not change when doing callbacks or
// interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
// Optimization for 2-byte strings often used as keys in a decompression
// dictionary. We internalize these short keys to avoid constantly
@@ -4068,7 +4074,7 @@
// Make sure that the top context does not change when doing callbacks or
// interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
LookupResult lookup(isolate);
object->LocalLookup(*name, &lookup, true);
@@ -4202,7 +4208,7 @@
// Make sure that the top context does not change when doing
// callbacks or interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
Handle<InterceptorInfo> interceptor(GetNamedInterceptor());
Handle<JSObject> receiver_handle(receiver);
@@ -4337,7 +4343,7 @@
// Make sure that the top context does not change when doing
// callbacks or interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
Handle<InterceptorInfo> interceptor(GetIndexedInterceptor());
Handle<JSReceiver> hreceiver(receiver);
@@ -5037,7 +5043,7 @@
// Make sure that the top context does not change when doing
// callbacks or interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor());
if (interceptor->deleter()->IsUndefined()) return factory->false_value();
@@ -6167,7 +6173,7 @@
// Make sure that the top context does not change when doing callbacks or
// interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
// Try to flatten before operating on the string.
if (name->IsString()) String::cast(*name)->TryFlatten();
@@ -6353,7 +6359,7 @@
// Make sure that the top context does not change when doing callbacks or
// interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
// Try to flatten before operating on the string.
if (name->IsString()) FlattenString(Handle<String>::cast(name));
@@ -6419,7 +6425,7 @@
// Make sure that the top context does not change when doing callbacks or
// interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
// Check access rights if needed.
if (object->IsAccessCheckNeeded() &&
@@ -11666,7 +11672,7 @@
// Make sure that the top context does not change when doing
// callbacks or interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
Handle<InterceptorInfo> interceptor(GetIndexedInterceptor());
Handle<JSObject> this_handle(this);
@@ -12678,7 +12684,7 @@
// Make sure that the top context does not change when doing
// callbacks or interceptor calls.
- AssertNoContextChange ncc;
+ AssertNoContextChange ncc(isolate);
Handle<InterceptorInfo> interceptor(GetIndexedInterceptor(), isolate);
Handle<Object> this_handle(receiver, isolate);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.