Changeset 216460 in webkit for trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
- Timestamp:
- May 8, 2017, 3:51:11 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r211247 r216460 1 1 /* 2 * Copyright (C) 2006 , 2007, 2008, 2016Apple Inc. All rights reserved.2 * Copyright (C) 2006-2017 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Kelvin W Sherlock ([email protected]) 4 4 * … … 53 53 #include "ObjectPrototype.h" 54 54 #include "PropertyNameArray.h" 55 #include "ProxyObject.h" 55 56 #include "RegExpConstructor.h" 56 57 … … 676 677 propertyNames->add(propertyName->identifier(propertyNames->vm())); 677 678 } 679 680 JSObjectRef JSObjectGetProxyTarget(JSObjectRef objectRef) 681 { 682 JSObject* object = toJS(objectRef); 683 if (!object) 684 return nullptr; 685 VM& vm = *object->vm(); 686 JSLockHolder locker(vm); 687 JSObject* result = nullptr; 688 if (JSProxy* proxy = jsDynamicCast<JSProxy*>(vm, object)) 689 result = proxy->target(); 690 else if (ProxyObject* proxy = jsDynamicCast<ProxyObject*>(vm, object)) 691 result = proxy->target(); 692 return toRef(result); 693 }
Note:
See TracChangeset
for help on using the changeset viewer.