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

Side by Side Diff: src/objects.cc

Issue 11266011: Delivery logic for Object.observe (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased against newest per-isolate patch 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 Handle<Object> args[] = { type, object, name, old_value }; 1734 Handle<Object> args[] = { type, object, name, old_value };
1735 bool threw; 1735 bool threw;
1736 Execution::Call(Handle<JSFunction>(isolate->observers_notify_change()), 1736 Execution::Call(Handle<JSFunction>(isolate->observers_notify_change()),
1737 Handle<Object>(isolate->heap()->undefined_value()), 1737 Handle<Object>(isolate->heap()->undefined_value()),
1738 old_value->IsTheHole() ? 3 : 4, args, 1738 old_value->IsTheHole() ? 3 : 4, args,
1739 &threw); 1739 &threw);
1740 ASSERT(!threw); 1740 ASSERT(!threw);
1741 } 1741 }
1742 1742
1743 1743
1744 void JSObject::DeliverChangeRecords(Isolate* isolate) {
1745 ASSERT(isolate->has_active_object_observers());
1746 isolate->set_has_active_object_observers(false);
rossberg 2012/11/06 16:45:57 This should probably be go to the end.
adamk 2012/11/06 17:00:09 Done.
1747 bool threw = false;
1748 Execution::Call(
1749 isolate->observers_deliver_changes(),
1750 isolate->factory()->undefined_value(),
1751 0,
1752 NULL,
1753 &threw);
1754 ASSERT(!threw);
1755 }
1756
1757
1744 MaybeObject* JSObject::SetPropertyPostInterceptor( 1758 MaybeObject* JSObject::SetPropertyPostInterceptor(
1745 String* name, 1759 String* name,
1746 Object* value, 1760 Object* value,
1747 PropertyAttributes attributes, 1761 PropertyAttributes attributes,
1748 StrictModeFlag strict_mode, 1762 StrictModeFlag strict_mode,
1749 ExtensibilityCheck extensibility_check) { 1763 ExtensibilityCheck extensibility_check) {
1750 // Check local property, ignore interceptor. 1764 // Check local property, ignore interceptor.
1751 LookupResult result(GetIsolate()); 1765 LookupResult result(GetIsolate());
1752 LocalLookupRealNamedProperty(name, &result); 1766 LocalLookupRealNamedProperty(name, &result);
1753 if (!result.IsFound()) map()->LookupTransition(this, name, &result); 1767 if (!result.IsFound()) map()->LookupTransition(this, name, &result);
(...skipping 11823 matching lines...) Expand 10 before | Expand all | Expand 10 after
13577 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13591 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13578 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13592 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13579 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13593 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13580 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13594 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13581 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13595 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13582 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13596 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13583 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13597 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13584 } 13598 }
13585 13599
13586 } } // namespace v8::internal 13600 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698