OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 30 matching lines...) Expand all Loading... |
41 #include "v8_npobject.h" | 41 #include "v8_npobject.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
45 NAMED_PROPERTY_GETTER(HTMLPlugInElement) | 45 NAMED_PROPERTY_GETTER(HTMLPlugInElement) |
46 { | 46 { |
47 INC_STATS("DOM.HTMLPlugInElement.NamedPropertyGetter"); | 47 INC_STATS("DOM.HTMLPlugInElement.NamedPropertyGetter"); |
48 HTMLPlugInElement* imp = V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.H
older()); | 48 HTMLPlugInElement* imp = V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.H
older()); |
49 ScriptInstance scriptInstance = imp->getInstance(); | 49 ScriptInstance scriptInstance = imp->getInstance(); |
50 if (!scriptInstance) | 50 if (!scriptInstance) |
51 return v8::Local<v8::Object>(); | 51 return deferToInterceptor(); |
52 | 52 |
53 v8::Local<v8::Object> instance = v8::Local<v8::Object>::New(scriptInstance->
instance()); | 53 v8::Local<v8::Object> instance = v8::Local<v8::Object>::New(scriptInstance->
instance()); |
54 if (instance.IsEmpty()) | 54 if (instance.IsEmpty()) |
55 return v8::Local<v8::Object>(); | 55 return deferToInterceptor(); |
56 | 56 |
57 return NPObjectGetNamedProperty(instance, name); | 57 return NPObjectGetNamedProperty(instance, name); |
58 } | 58 } |
59 | 59 |
60 NAMED_PROPERTY_SETTER(HTMLPlugInElement) | 60 NAMED_PROPERTY_SETTER(HTMLPlugInElement) |
61 { | 61 { |
62 INC_STATS("DOM.HTMLPlugInElement.NamedPropertySetter"); | 62 INC_STATS("DOM.HTMLPlugInElement.NamedPropertySetter"); |
63 HTMLPlugInElement* imp = V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.H
older()); | 63 HTMLPlugInElement* imp = V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.H
older()); |
64 ScriptInstance scriptInstance = imp->getInstance(); | 64 ScriptInstance scriptInstance = imp->getInstance(); |
65 if (!scriptInstance) | 65 if (!scriptInstance) |
66 return v8::Local<v8::Object>(); | 66 return deferToInterceptor(); |
67 | 67 |
68 v8::Local<v8::Object> instance = v8::Local<v8::Object>::New(scriptInstance->
instance()); | 68 v8::Local<v8::Object> instance = v8::Local<v8::Object>::New(scriptInstance->
instance()); |
69 if (instance.IsEmpty()) | 69 if (instance.IsEmpty()) |
70 return v8::Local<v8::Object>(); | 70 return deferToInterceptor(); |
71 | 71 |
72 return NPObjectSetNamedProperty(instance, name, value); | 72 return NPObjectSetNamedProperty(instance, name, value); |
73 } | 73 } |
74 | 74 |
75 CALLBACK_FUNC_DECL(HTMLPlugInElement) | 75 CALLBACK_FUNC_DECL(HTMLPlugInElement) |
76 { | 76 { |
77 INC_STATS("DOM.HTMLPluginElement()"); | 77 INC_STATS("DOM.HTMLPluginElement()"); |
78 return NPObjectInvokeDefaultHandler(args); | 78 return NPObjectInvokeDefaultHandler(args); |
79 } | 79 } |
80 | 80 |
(...skipping 21 matching lines...) Expand all Loading... |
102 return v8::Local<v8::Object>(); | 102 return v8::Local<v8::Object>(); |
103 | 103 |
104 v8::Local<v8::Object> instance = v8::Local<v8::Object>::New(scriptInstance->
instance()); | 104 v8::Local<v8::Object> instance = v8::Local<v8::Object>::New(scriptInstance->
instance()); |
105 if (instance.IsEmpty()) | 105 if (instance.IsEmpty()) |
106 return v8::Local<v8::Object>(); | 106 return v8::Local<v8::Object>(); |
107 | 107 |
108 return NPObjectSetIndexedProperty(instance, index, value); | 108 return NPObjectSetIndexedProperty(instance, index, value); |
109 } | 109 } |
110 | 110 |
111 } // namespace WebCore | 111 } // namespace WebCore |
OLD | NEW |