OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1878 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw) { | 1878 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw) { |
1879 Isolate* isolate = it->isolate(); | 1879 Isolate* isolate = it->isolate(); |
1880 Handle<JSObject> checked = it->GetHolder<JSObject>(); | 1880 Handle<JSObject> checked = it->GetHolder<JSObject>(); |
1881 Handle<InterceptorInfo> interceptor = | 1881 Handle<InterceptorInfo> interceptor = |
1882 it->GetInterceptorForFailedAccessCheck(); | 1882 it->GetInterceptorForFailedAccessCheck(); |
1883 if (interceptor.is_null()) { | 1883 if (interceptor.is_null()) { |
1884 if (AllCanWrite(it)) { | 1884 if (AllCanWrite(it)) { |
1885 return SetPropertyWithAccessor(it, value, should_throw); | 1885 return SetPropertyWithAccessor(it, value, should_throw); |
1886 } | 1886 } |
1887 } else { | 1887 } else { |
1888 Maybe<bool> result = SetPropertyWithInterceptorInternal( | 1888 return SetPropertyWithInterceptorInternal(it, interceptor, should_throw, |
1889 it, interceptor, should_throw, value); | 1889 value); |
1890 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); | |
1891 if (result.IsJust()) return result; | |
1892 } | 1890 } |
1893 | 1891 |
1894 isolate->ReportFailedAccessCheck(checked); | 1892 isolate->ReportFailedAccessCheck(checked); |
jochen (gone - plz use gerrit)
2016/12/06 10:05:22
maybe move these lines into the if () { } block, s
| |
1895 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); | 1893 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); |
1896 return Just(true); | 1894 return Just(true); |
1897 } | 1895 } |
1898 | 1896 |
1899 | 1897 |
1900 void JSObject::SetNormalizedProperty(Handle<JSObject> object, | 1898 void JSObject::SetNormalizedProperty(Handle<JSObject> object, |
1901 Handle<Name> name, | 1899 Handle<Name> name, |
1902 Handle<Object> value, | 1900 Handle<Object> value, |
1903 PropertyDetails details) { | 1901 PropertyDetails details) { |
1904 DCHECK(!object->HasFastProperties()); | 1902 DCHECK(!object->HasFastProperties()); |
(...skipping 18597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
20502 // depend on this. | 20500 // depend on this. |
20503 return DICTIONARY_ELEMENTS; | 20501 return DICTIONARY_ELEMENTS; |
20504 } | 20502 } |
20505 DCHECK_LE(kind, LAST_ELEMENTS_KIND); | 20503 DCHECK_LE(kind, LAST_ELEMENTS_KIND); |
20506 return kind; | 20504 return kind; |
20507 } | 20505 } |
20508 } | 20506 } |
20509 | 20507 |
20510 } // namespace internal | 20508 } // namespace internal |
20511 } // namespace v8 | 20509 } // namespace v8 |
OLD | NEW |