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

Unified Diff: src/objects-debug.cc

Issue 188005: Added possibility of miscompiled regexp to verfifier. (Closed)
Patch Set: Created 11 years, 4 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index ef4aae531155ed0d621d73c8359e0fdcf5473d9b..922dd9a90fb0ff5e1c24bde8e8cac2c27596b731 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -769,10 +769,13 @@ void JSRegExp::JSRegExpVerify() {
FixedArray* arr = FixedArray::cast(data());
Object* ascii_data = arr->get(JSRegExp::kIrregexpASCIICodeIndex);
- ASSERT(ascii_data->IsTheHole()
+ // TheHole : Not compiled yet.
+ // JSObject: Compilation error.
+ // Code/ByteArray: Compiled code.
+ ASSERT(ascii_data->IsTheHole() || ascii_data->IsJSObject()
|| (is_native ? ascii_data->IsCode() : ascii_data->IsByteArray()));
Mads Ager (chromium) 2009/09/02 08:15:14 Put the || on the previous line and indent: ASSER
Object* uc16_data = arr->get(JSRegExp::kIrregexpUC16CodeIndex);
- ASSERT(uc16_data->IsTheHole()
+ ASSERT(uc16_data->IsTheHole() || ascii_data->IsJSObject()
|| (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray()));
Mads Ager (chromium) 2009/09/02 08:15:14 Indentation as above.
ASSERT(arr->get(JSRegExp::kIrregexpCaptureCountIndex)->IsSmi());
ASSERT(arr->get(JSRegExp::kIrregexpMaxRegisterCountIndex)->IsSmi());
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698