Changeset 15133 in webkit for trunk/JavaScriptCore/API/JSValueRef.cpp
- Timestamp:
- Jul 1, 2006, 9:06:07 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSValueRef.cpp
r14951 r15133 25 25 */ 26 26 27 #include "APICast.h" 28 #include "JSCallbackObject.h" 27 29 #include "JSValueRef.h" 28 #include "APICast.h" 29 #include < JavaScriptCore/JSType.h>30 #include < JavaScriptCore/internal.h>31 #include < JavaScriptCore/operations.h>32 #include < JavaScriptCore/protect.h>33 #include < JavaScriptCore/ustring.h>34 #include < JavaScriptCore/value.h>30 31 #include <kjs/JSType.h> 32 #include <kjs/internal.h> 33 #include <kjs/operations.h> 34 #include <kjs/protect.h> 35 #include <kjs/ustring.h> 36 #include <kjs/value.h> 35 37 36 38 #include <wtf/Assertions.h> … … 98 100 } 99 101 102 bool JSValueIsObjectOfClass(JSValueRef value, JSClassRef jsClass) 103 { 104 JSValue* jsValue = toJS(value); 105 106 if (JSObject* o = jsValue->getObject()) 107 if (o->inherits(&JSCallbackObject::info)) 108 return static_cast<JSCallbackObject*>(o)->inherits(jsClass); 109 return false; 110 } 111 100 112 bool JSValueIsEqual(JSContextRef context, JSValueRef a, JSValueRef b) 101 113 { … … 124 136 } 125 137 138 bool JSValueIsInstanceOf(JSContextRef context, JSValueRef value, JSObjectRef object) 139 { 140 ExecState* exec = toJS(context); 141 JSValue* jsValue = toJS(value); 142 JSObject* jsObject = toJS(object); 143 if (!jsObject->implementsHasInstance()) 144 return false; 145 bool result = jsObject->hasInstance(exec, jsValue); 146 if (exec->hadException()) 147 exec->clearException(); 148 return result; 149 } 150 126 151 JSValueRef JSUndefinedMake() 127 152 {
Note:
See TracChangeset
for help on using the changeset viewer.