| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/isolate.h" | 5 #include "src/isolate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 | 1341 |
| 1342 // Traverse prototype chain to find out whether the object is derived from | 1342 // Traverse prototype chain to find out whether the object is derived from |
| 1343 // the Error object. | 1343 // the Error object. |
| 1344 bool Isolate::IsErrorObject(Handle<Object> obj) { | 1344 bool Isolate::IsErrorObject(Handle<Object> obj) { |
| 1345 if (!obj->IsJSObject()) return false; | 1345 if (!obj->IsJSObject()) return false; |
| 1346 Handle<Object> error_constructor = error_function(); | 1346 Handle<Object> error_constructor = error_function(); |
| 1347 DisallowHeapAllocation no_gc; | 1347 DisallowHeapAllocation no_gc; |
| 1348 for (PrototypeIterator iter(this, *obj, PrototypeIterator::START_AT_RECEIVER); | 1348 for (PrototypeIterator iter(this, *obj, PrototypeIterator::START_AT_RECEIVER); |
| 1349 !iter.IsAtEnd(); iter.Advance()) { | 1349 !iter.IsAtEnd(); iter.Advance()) { |
| 1350 if (iter.GetCurrent()->IsJSProxy()) return false; | 1350 if (iter.GetCurrent()->IsJSProxy()) return false; |
| 1351 if (JSObject::cast(iter.GetCurrent())->map()->GetConstructor() == | 1351 if (iter.GetCurrent<JSObject>()->map()->GetConstructor() == |
| 1352 *error_constructor) { | 1352 *error_constructor) { |
| 1353 return true; | 1353 return true; |
| 1354 } | 1354 } |
| 1355 } | 1355 } |
| 1356 return false; | 1356 return false; |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 | 1359 |
| 1360 Handle<JSMessageObject> Isolate::CreateMessage(Handle<Object> exception, | 1360 Handle<JSMessageObject> Isolate::CreateMessage(Handle<Object> exception, |
| 1361 MessageLocation* location) { | 1361 MessageLocation* location) { |
| (...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2822 // Then check whether this scope intercepts. | 2822 // Then check whether this scope intercepts. |
| 2823 if ((flag & intercept_mask_)) { | 2823 if ((flag & intercept_mask_)) { |
| 2824 intercepted_flags_ |= flag; | 2824 intercepted_flags_ |= flag; |
| 2825 return true; | 2825 return true; |
| 2826 } | 2826 } |
| 2827 return false; | 2827 return false; |
| 2828 } | 2828 } |
| 2829 | 2829 |
| 2830 } // namespace internal | 2830 } // namespace internal |
| 2831 } // namespace v8 | 2831 } // namespace v8 |
| OLD | NEW |