| 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 <sstream> | 9 #include <sstream> | 
| 10 | 10 | 
| (...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1282 | 1282 | 
| 1283   Handle<Object> argv[] = { value }; | 1283   Handle<Object> argv[] = { value }; | 
| 1284   RETURN_ON_EXCEPTION_VALUE(isolate, Execution::Call(isolate, setter, receiver, | 1284   RETURN_ON_EXCEPTION_VALUE(isolate, Execution::Call(isolate, setter, receiver, | 
| 1285                                                      arraysize(argv), argv), | 1285                                                      arraysize(argv), argv), | 
| 1286                             Nothing<bool>()); | 1286                             Nothing<bool>()); | 
| 1287   return Just(true); | 1287   return Just(true); | 
| 1288 } | 1288 } | 
| 1289 | 1289 | 
| 1290 | 1290 | 
| 1291 // static | 1291 // static | 
|  | 1292 bool Object::IsErrorObject(Isolate* isolate, Handle<Object> object) { | 
|  | 1293   if (!object->IsJSObject()) return false; | 
|  | 1294   // Use stack_trace_symbol as proxy for [[ErrorData]]. | 
|  | 1295   Handle<Name> symbol = isolate->factory()->stack_trace_symbol(); | 
|  | 1296   Maybe<bool> has_stack_trace = | 
|  | 1297       JSReceiver::HasOwnProperty(Handle<JSReceiver>::cast(object), symbol); | 
|  | 1298   DCHECK(!has_stack_trace.IsNothing()); | 
|  | 1299   return has_stack_trace.FromJust(); | 
|  | 1300 } | 
|  | 1301 | 
|  | 1302 | 
|  | 1303 // static | 
| 1292 bool JSObject::AllCanRead(LookupIterator* it) { | 1304 bool JSObject::AllCanRead(LookupIterator* it) { | 
| 1293   // Skip current iteration, it's in state ACCESS_CHECK or INTERCEPTOR, both of | 1305   // Skip current iteration, it's in state ACCESS_CHECK or INTERCEPTOR, both of | 
| 1294   // which have already been checked. | 1306   // which have already been checked. | 
| 1295   DCHECK(it->state() == LookupIterator::ACCESS_CHECK || | 1307   DCHECK(it->state() == LookupIterator::ACCESS_CHECK || | 
| 1296          it->state() == LookupIterator::INTERCEPTOR); | 1308          it->state() == LookupIterator::INTERCEPTOR); | 
| 1297   for (it->Next(); it->IsFound(); it->Next()) { | 1309   for (it->Next(); it->IsFound(); it->Next()) { | 
| 1298     if (it->state() == LookupIterator::ACCESSOR) { | 1310     if (it->state() == LookupIterator::ACCESSOR) { | 
| 1299       auto accessors = it->GetAccessors(); | 1311       auto accessors = it->GetAccessors(); | 
| 1300       if (accessors->IsAccessorInfo()) { | 1312       if (accessors->IsAccessorInfo()) { | 
| 1301         if (AccessorInfo::cast(*accessors)->all_can_read()) return true; | 1313         if (AccessorInfo::cast(*accessors)->all_can_read()) return true; | 
| (...skipping 17544 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 18846   } else { | 18858   } else { | 
| 18847     // Old-style generators. | 18859     // Old-style generators. | 
| 18848     int offset = continuation(); | 18860     int offset = continuation(); | 
| 18849     CHECK(0 <= offset && offset < function()->code()->instruction_size()); | 18861     CHECK(0 <= offset && offset < function()->code()->instruction_size()); | 
| 18850     return function()->code()->SourcePosition(offset); | 18862     return function()->code()->SourcePosition(offset); | 
| 18851   } | 18863   } | 
| 18852 } | 18864 } | 
| 18853 | 18865 | 
| 18854 }  // namespace internal | 18866 }  // namespace internal | 
| 18855 }  // namespace v8 | 18867 }  // namespace v8 | 
| OLD | NEW | 
|---|