OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 void npObjectNamedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyC
allbackInfo<v8::Value>& info) | 275 void npObjectNamedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyC
allbackInfo<v8::Value>& info) |
276 { | 276 { |
277 NPIdentifier identifier = getStringIdentifier(name); | 277 NPIdentifier identifier = getStringIdentifier(name); |
278 v8SetReturnValue(info, npObjectGetProperty(info.Holder(), identifier, name,
info.GetIsolate())); | 278 v8SetReturnValue(info, npObjectGetProperty(info.Holder(), identifier, name,
info.GetIsolate())); |
279 } | 279 } |
280 | 280 |
281 void npObjectIndexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInf
o<v8::Value>& info) | 281 void npObjectIndexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInf
o<v8::Value>& info) |
282 { | 282 { |
283 NPIdentifier identifier = _NPN_GetIntIdentifier(index); | 283 NPIdentifier identifier = _NPN_GetIntIdentifier(index); |
284 v8SetReturnValue(info, npObjectGetProperty(info.Holder(), identifier, v8::Nu
mber::New(index), info.GetIsolate())); | 284 v8SetReturnValue(info, npObjectGetProperty(info.Holder(), identifier, v8::Nu
mber::New(info.GetIsolate(), index), info.GetIsolate())); |
285 } | 285 } |
286 | 286 |
287 void npObjectGetNamedProperty(v8::Local<v8::Object> self, v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) | 287 void npObjectGetNamedProperty(v8::Local<v8::Object> self, v8::Local<v8::String>
name, const v8::PropertyCallbackInfo<v8::Value>& info) |
288 { | 288 { |
289 NPIdentifier identifier = getStringIdentifier(name); | 289 NPIdentifier identifier = getStringIdentifier(name); |
290 v8SetReturnValue(info, npObjectGetProperty(self, identifier, name, info.GetI
solate())); | 290 v8SetReturnValue(info, npObjectGetProperty(self, identifier, name, info.GetI
solate())); |
291 } | 291 } |
292 | 292 |
293 void npObjectGetIndexedProperty(v8::Local<v8::Object> self, uint32_t index, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 293 void npObjectGetIndexedProperty(v8::Local<v8::Object> self, uint32_t index, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
294 { | 294 { |
295 NPIdentifier identifier = _NPN_GetIntIdentifier(index); | 295 NPIdentifier identifier = _NPN_GetIntIdentifier(index); |
296 v8SetReturnValue(info, npObjectGetProperty(self, identifier, v8::Number::New
(index), info.GetIsolate())); | 296 v8SetReturnValue(info, npObjectGetProperty(self, identifier, v8::Number::New
(info.GetIsolate(), index), info.GetIsolate())); |
297 } | 297 } |
298 | 298 |
299 void npObjectQueryProperty(v8::Local<v8::String> name, const v8::PropertyCallbac
kInfo<v8::Integer>& info) | 299 void npObjectQueryProperty(v8::Local<v8::String> name, const v8::PropertyCallbac
kInfo<v8::Integer>& info) |
300 { | 300 { |
301 NPIdentifier identifier = getStringIdentifier(name); | 301 NPIdentifier identifier = getStringIdentifier(name); |
302 if (npObjectGetProperty(info.Holder(), identifier, name, info.GetIsolate()).
IsEmpty()) | 302 if (npObjectGetProperty(info.Holder(), identifier, name, info.GetIsolate()).
IsEmpty()) |
303 return; | 303 return; |
304 v8SetReturnValueInt(info, 0); | 304 v8SetReturnValueInt(info, 0); |
305 } | 305 } |
306 | 306 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 v8::HandleScope scope(isolate); | 472 v8::HandleScope scope(isolate); |
473 v8::Handle<v8::Object> wrapper = staticNPObjectMap().newLocal(object, isolat
e); | 473 v8::Handle<v8::Object> wrapper = staticNPObjectMap().newLocal(object, isolat
e); |
474 if (!wrapper.IsEmpty()) { | 474 if (!wrapper.IsEmpty()) { |
475 V8DOMWrapper::clearNativeInfo(wrapper, npObjectTypeInfo()); | 475 V8DOMWrapper::clearNativeInfo(wrapper, npObjectTypeInfo()); |
476 staticNPObjectMap().removeAndDispose(object); | 476 staticNPObjectMap().removeAndDispose(object); |
477 _NPN_ReleaseObject(object); | 477 _NPN_ReleaseObject(object); |
478 } | 478 } |
479 } | 479 } |
480 | 480 |
481 } // namespace WebCore | 481 } // namespace WebCore |
OLD | NEW |