OLD | NEW |
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 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 } | 1741 } |
1742 | 1742 |
1743 | 1743 |
1744 void JSObject::EnqueueChangeRecord(Handle<JSObject> object, | 1744 void JSObject::EnqueueChangeRecord(Handle<JSObject> object, |
1745 const char* type_str, | 1745 const char* type_str, |
1746 Handle<String> name, | 1746 Handle<String> name, |
1747 Handle<Object> old_value) { | 1747 Handle<Object> old_value) { |
1748 Isolate* isolate = object->GetIsolate(); | 1748 Isolate* isolate = object->GetIsolate(); |
1749 HandleScope scope; | 1749 HandleScope scope; |
1750 Handle<String> type = isolate->factory()->LookupAsciiSymbol(type_str); | 1750 Handle<String> type = isolate->factory()->LookupAsciiSymbol(type_str); |
| 1751 if (object->IsJSGlobalObject()) { |
| 1752 object = handle(JSGlobalObject::cast(*object)->global_receiver(), isolate); |
| 1753 } |
1751 Handle<Object> args[] = { type, object, name, old_value }; | 1754 Handle<Object> args[] = { type, object, name, old_value }; |
1752 bool threw; | 1755 bool threw; |
1753 Execution::Call(Handle<JSFunction>(isolate->observers_notify_change()), | 1756 Execution::Call(Handle<JSFunction>(isolate->observers_notify_change()), |
1754 Handle<Object>(isolate->heap()->undefined_value()), | 1757 Handle<Object>(isolate->heap()->undefined_value()), |
1755 old_value->IsTheHole() ? 3 : 4, args, | 1758 old_value->IsTheHole() ? 3 : 4, args, |
1756 &threw); | 1759 &threw); |
1757 ASSERT(!threw); | 1760 ASSERT(!threw); |
1758 } | 1761 } |
1759 | 1762 |
1760 | 1763 |
(...skipping 12117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13878 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13881 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13879 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13882 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13880 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13883 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13881 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13884 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13882 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13885 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13883 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13886 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13884 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13887 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13885 } | 13888 } |
13886 | 13889 |
13887 } } // namespace v8::internal | 13890 } } // namespace v8::internal |
OLD | NEW |