Changeset 52751 in webkit for trunk/JavaScriptCore/API/JSValueRef.cpp
- Timestamp:
- Jan 4, 2010, 11:18:31 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSValueRef.cpp
r51801 r52751 29 29 #include <wtf/Platform.h> 30 30 #include "APICast.h" 31 #include "APIShims.h" 31 32 #include "JSCallbackObject.h" 32 33 … … 42 43 #include <algorithm> // for std::min 43 44 44 JSType JSValueGetType(JSContextRef ctx, JSValueRef value) 45 { 46 JSC::ExecState* exec = toJS(ctx); 47 exec->globalData().heap.registerThread(); 48 JSC::JSLock lock(exec); 49 50 JSC::JSValue jsValue = toJS(exec, value); 45 using namespace JSC; 46 47 ::JSType JSValueGetType(JSContextRef ctx, JSValueRef value) 48 { 49 ExecState* exec = toJS(ctx); 50 APIEntryShim entryShim(exec); 51 52 JSValue jsValue = toJS(exec, value); 51 53 52 54 if (jsValue.isUndefined()) … … 64 66 } 65 67 66 using namespace JSC; // placed here to avoid conflict between JSC::JSType and JSType, above.67 68 68 bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) 69 69 { 70 70 ExecState* exec = toJS(ctx); 71 exec->globalData().heap.registerThread(); 72 JSLock lock(exec); 71 APIEntryShim entryShim(exec); 73 72 74 73 JSValue jsValue = toJS(exec, value); … … 79 78 { 80 79 ExecState* exec = toJS(ctx); 81 exec->globalData().heap.registerThread(); 82 JSLock lock(exec); 80 APIEntryShim entryShim(exec); 83 81 84 82 JSValue jsValue = toJS(exec, value); … … 89 87 { 90 88 ExecState* exec = toJS(ctx); 91 exec->globalData().heap.registerThread(); 92 JSLock lock(exec); 89 APIEntryShim entryShim(exec); 93 90 94 91 JSValue jsValue = toJS(exec, value); … … 99 96 { 100 97 ExecState* exec = toJS(ctx); 101 exec->globalData().heap.registerThread(); 102 JSLock lock(exec); 98 APIEntryShim entryShim(exec); 103 99 104 100 JSValue jsValue = toJS(exec, value); … … 109 105 { 110 106 ExecState* exec = toJS(ctx); 111 exec->globalData().heap.registerThread(); 112 JSLock lock(exec); 107 APIEntryShim entryShim(exec); 113 108 114 109 JSValue jsValue = toJS(exec, value); … … 119 114 { 120 115 ExecState* exec = toJS(ctx); 121 exec->globalData().heap.registerThread(); 122 JSLock lock(exec); 116 APIEntryShim entryShim(exec); 123 117 124 118 JSValue jsValue = toJS(exec, value); … … 129 123 { 130 124 ExecState* exec = toJS(ctx); 131 exec->globalData().heap.registerThread(); 132 JSLock lock(exec); 125 APIEntryShim entryShim(exec); 133 126 134 127 JSValue jsValue = toJS(exec, value); … … 146 139 { 147 140 ExecState* exec = toJS(ctx); 148 exec->globalData().heap.registerThread(); 149 JSLock lock(exec); 141 APIEntryShim entryShim(exec); 150 142 151 143 JSValue jsA = toJS(exec, a); … … 164 156 { 165 157 ExecState* exec = toJS(ctx); 166 exec->globalData().heap.registerThread(); 167 JSLock lock(exec); 158 APIEntryShim entryShim(exec); 168 159 169 160 JSValue jsA = toJS(exec, a); … … 176 167 { 177 168 ExecState* exec = toJS(ctx); 178 exec->globalData().heap.registerThread(); 179 JSLock lock(exec); 169 APIEntryShim entryShim(exec); 180 170 181 171 JSValue jsValue = toJS(exec, value); … … 196 186 { 197 187 ExecState* exec = toJS(ctx); 198 exec->globalData().heap.registerThread(); 199 JSLock lock(exec); 188 APIEntryShim entryShim(exec); 200 189 201 190 return toRef(exec, jsUndefined()); … … 205 194 { 206 195 ExecState* exec = toJS(ctx); 207 exec->globalData().heap.registerThread(); 208 JSLock lock(exec); 196 APIEntryShim entryShim(exec); 209 197 210 198 return toRef(exec, jsNull()); … … 214 202 { 215 203 ExecState* exec = toJS(ctx); 216 exec->globalData().heap.registerThread(); 217 JSLock lock(exec); 204 APIEntryShim entryShim(exec); 218 205 219 206 return toRef(exec, jsBoolean(value)); … … 223 210 { 224 211 ExecState* exec = toJS(ctx); 225 exec->globalData().heap.registerThread(); 226 JSLock lock(exec); 212 APIEntryShim entryShim(exec); 227 213 228 214 return toRef(exec, jsNumber(exec, value)); … … 232 218 { 233 219 ExecState* exec = toJS(ctx); 234 exec->globalData().heap.registerThread(); 235 JSLock lock(exec); 220 APIEntryShim entryShim(exec); 236 221 237 222 return toRef(exec, jsString(exec, string->ustring())); … … 241 226 { 242 227 ExecState* exec = toJS(ctx); 243 exec->globalData().heap.registerThread(); 244 JSLock lock(exec); 228 APIEntryShim entryShim(exec); 245 229 246 230 JSValue jsValue = toJS(exec, value); … … 251 235 { 252 236 ExecState* exec = toJS(ctx); 253 exec->globalData().heap.registerThread(); 254 JSLock lock(exec); 237 APIEntryShim entryShim(exec); 255 238 256 239 JSValue jsValue = toJS(exec, value); … … 269 252 { 270 253 ExecState* exec = toJS(ctx); 271 exec->globalData().heap.registerThread(); 272 JSLock lock(exec); 254 APIEntryShim entryShim(exec); 273 255 274 256 JSValue jsValue = toJS(exec, value); … … 287 269 { 288 270 ExecState* exec = toJS(ctx); 289 exec->globalData().heap.registerThread(); 290 JSLock lock(exec); 271 APIEntryShim entryShim(exec); 291 272 292 273 JSValue jsValue = toJS(exec, value); … … 305 286 { 306 287 ExecState* exec = toJS(ctx); 307 exec->globalData().heap.registerThread(); 308 JSLock lock(exec); 288 APIEntryShim entryShim(exec); 309 289 310 290 JSValue jsValue = toJSForGC(exec, value); … … 315 295 { 316 296 ExecState* exec = toJS(ctx); 317 exec->globalData().heap.registerThread(); 318 JSLock lock(exec); 297 APIEntryShim entryShim(exec); 319 298 320 299 JSValue jsValue = toJSForGC(exec, value);
Note:
See TracChangeset
for help on using the changeset viewer.