OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1484 Factory* factory = isolate->factory(); | 1484 Factory* factory = isolate->factory(); |
1485 Handle<GlobalObject> global(native_context->global_object()); | 1485 Handle<GlobalObject> global(native_context->global_object()); |
1486 const char* period_pos = strchr(holder_expr, '.'); | 1486 const char* period_pos = strchr(holder_expr, '.'); |
1487 if (period_pos == NULL) { | 1487 if (period_pos == NULL) { |
1488 return Handle<JSObject>::cast( | 1488 return Handle<JSObject>::cast( |
1489 Object::GetPropertyOrElement( | 1489 Object::GetPropertyOrElement( |
1490 global, factory->InternalizeUtf8String(holder_expr)) | 1490 global, factory->InternalizeUtf8String(holder_expr)) |
1491 .ToHandleChecked()); | 1491 .ToHandleChecked()); |
1492 } | 1492 } |
1493 const char* inner = period_pos + 1; | 1493 const char* inner = period_pos + 1; |
1494 DCHECK(!strchr(inner, '.')); | 1494 DCHECK_EQ(NULL, strchr(inner, '.')); |
1495 Vector<const char> property(holder_expr, | 1495 Vector<const char> property(holder_expr, |
1496 static_cast<int>(period_pos - holder_expr)); | 1496 static_cast<int>(period_pos - holder_expr)); |
1497 Handle<String> property_string = factory->InternalizeUtf8String(property); | 1497 Handle<String> property_string = factory->InternalizeUtf8String(property); |
1498 DCHECK(!property_string.is_null()); | 1498 DCHECK(!property_string.is_null()); |
1499 Handle<JSObject> object = Handle<JSObject>::cast( | 1499 Handle<JSObject> object = Handle<JSObject>::cast( |
1500 Object::GetProperty(global, property_string).ToHandleChecked()); | 1500 Object::GetProperty(global, property_string).ToHandleChecked()); |
1501 if (strcmp("prototype", inner) == 0) { | 1501 if (strcmp("prototype", inner) == 0) { |
1502 Handle<JSFunction> function = Handle<JSFunction>::cast(object); | 1502 Handle<JSFunction> function = Handle<JSFunction>::cast(object); |
1503 return Handle<JSObject>(JSObject::cast(function->prototype())); | 1503 return Handle<JSObject>(JSObject::cast(function->prototype())); |
1504 } | 1504 } |
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2876 return from + sizeof(NestingCounterType); | 2876 return from + sizeof(NestingCounterType); |
2877 } | 2877 } |
2878 | 2878 |
2879 | 2879 |
2880 // Called when the top-level V8 mutex is destroyed. | 2880 // Called when the top-level V8 mutex is destroyed. |
2881 void Bootstrapper::FreeThreadResources() { | 2881 void Bootstrapper::FreeThreadResources() { |
2882 DCHECK(!IsActive()); | 2882 DCHECK(!IsActive()); |
2883 } | 2883 } |
2884 | 2884 |
2885 } } // namespace v8::internal | 2885 } } // namespace v8::internal |
OLD | NEW |