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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
613 Handle<Object> value(value_raw, isolate); | 613 Handle<Object> value(value_raw, isolate); |
614 if (!function->should_have_prototype()) { | 614 if (!function->should_have_prototype()) { |
615 // Since we hit this accessor, object will have no prototype property. | 615 // Since we hit this accessor, object will have no prototype property. |
616 Handle<Object> result = JSObject::SetLocalPropertyIgnoreAttributes(object, | 616 Handle<Object> result = JSObject::SetLocalPropertyIgnoreAttributes(object, |
617 isolate->factory()->prototype_string(), value, NONE); | 617 isolate->factory()->prototype_string(), value, NONE); |
618 RETURN_IF_EMPTY_HANDLE(isolate, result); | 618 RETURN_IF_EMPTY_HANDLE(isolate, result); |
619 return *result; | 619 return *result; |
620 } | 620 } |
621 | 621 |
622 Handle<Object> old_value; | 622 Handle<Object> old_value; |
623 bool is_observed = | 623 bool is_observed = |
rossberg
2014/03/06 08:41:35
Nit: does this fit one line now?
rafaelw
2014/03/07 04:33:06
Yes. done
On 2014/03/06 08:41:35, rossberg wrote:
| |
624 FLAG_harmony_observation && | |
625 *function == *object && | 624 *function == *object && |
626 function->map()->is_observed(); | 625 function->map()->is_observed(); |
627 if (is_observed) { | 626 if (is_observed) { |
628 if (function->has_prototype()) | 627 if (function->has_prototype()) |
629 old_value = handle(function->prototype(), isolate); | 628 old_value = handle(function->prototype(), isolate); |
630 else | 629 else |
631 old_value = isolate->factory()->NewFunctionPrototype(function); | 630 old_value = isolate->factory()->NewFunctionPrototype(function); |
632 } | 631 } |
633 | 632 |
634 JSFunction::SetPrototype(function, value); | 633 JSFunction::SetPrototype(function, value); |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
988 info->set_data(Smi::FromInt(index)); | 987 info->set_data(Smi::FromInt(index)); |
989 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); | 988 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); |
990 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); | 989 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); |
991 info->set_getter(*getter); | 990 info->set_getter(*getter); |
992 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 991 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
993 return info; | 992 return info; |
994 } | 993 } |
995 | 994 |
996 | 995 |
997 } } // namespace v8::internal | 996 } } // namespace v8::internal |
OLD | NEW |