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

Unified Diff: src/objects.cc

Issue 2831016: [Isolates] Static mutable data of Scanner class moved to ScannerCharacterClasses / Isolate. (Closed)
Patch Set: . Created 10 years, 6 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/isolate.cc ('k') | src/scanner.h » ('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 668c4334d5e3285c0bfa9307fd125b1b2b622826..fdfc1fc186d21c36c1b34ed54e963b5c980a2128 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1230,7 +1230,9 @@ Object* JSObject::AddFastProperty(String* name,
// Normalize the object if the name is an actual string (not the
// hidden symbols) and is not a real identifier.
StringInputBuffer buffer(name);
- if (!Scanner::IsIdentifier(&buffer) && name != HEAP->hidden_symbol()) {
+ Isolate* isolate = Isolate::Current();
+ if (!isolate->scanner_character_classes()->IsIdentifier(&buffer) &&
+ name != isolate->heap()->hidden_symbol()) {
Object* obj = NormalizeProperties(CLEAR_INOBJECT_PROPERTIES, 0);
if (obj->IsFailure()) return obj;
return AddSlowProperty(name, value, attributes);
@@ -4757,7 +4759,8 @@ bool String::MarkAsUndetectable() {
bool String::IsEqualTo(Vector<const char> str) {
int slen = length();
- Access<Scanner::Utf8Decoder> decoder(Scanner::utf8_decoder());
+ Access<Scanner::Utf8Decoder> decoder(Isolate::Current()->
+ scanner_character_classes()->utf8_decoder());
decoder->Reset(str.start(), str.length());
int i;
for (i = 0; i < slen && decoder->has_more(); i++) {
« no previous file with comments | « src/isolate.cc ('k') | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698