| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 break; | 129 break; |
| 130 case InvokeDefault: | 130 case InvokeDefault: |
| 131 if (npObject->_class->invokeDefault) | 131 if (npObject->_class->invokeDefault) |
| 132 retval = npObject->_class->invokeDefault(npObject, npArgs.get(), num
Args, &result); | 132 retval = npObject->_class->invokeDefault(npObject, npArgs.get(), num
Args, &result); |
| 133 break; | 133 break; |
| 134 default: | 134 default: |
| 135 break; | 135 break; |
| 136 } | 136 } |
| 137 | 137 |
| 138 if (!retval) | 138 if (!retval) |
| 139 V8ThrowException::throwGeneralError("Error calling method on NPObject.",
isolate); | 139 V8ThrowException::throwGeneralError(isolate, "Error calling method on NP
Object."); |
| 140 | 140 |
| 141 for (int i = 0; i < numArgs; i++) | 141 for (int i = 0; i < numArgs; i++) |
| 142 _NPN_ReleaseVariantValue(&npArgs[i]); | 142 _NPN_ReleaseVariantValue(&npArgs[i]); |
| 143 | 143 |
| 144 // Unwrap return values. | 144 // Unwrap return values. |
| 145 v8::Handle<v8::Value> returnValue; | 145 v8::Handle<v8::Value> returnValue; |
| 146 if (_NPN_IsAlive(npObject)) | 146 if (_NPN_IsAlive(npObject)) |
| 147 returnValue = convertNPVariantToV8Object(&result, npObject, isolate); | 147 returnValue = convertNPVariantToV8Object(&result, npObject, isolate); |
| 148 _NPN_ReleaseVariantValue(&result); | 148 _NPN_ReleaseVariantValue(&result); |
| 149 | 149 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 v8::HandleScope scope(isolate); | 487 v8::HandleScope scope(isolate); |
| 488 v8::Handle<v8::Object> wrapper = staticNPObjectMap().newLocal(object, isolat
e); | 488 v8::Handle<v8::Object> wrapper = staticNPObjectMap().newLocal(object, isolat
e); |
| 489 if (!wrapper.IsEmpty()) { | 489 if (!wrapper.IsEmpty()) { |
| 490 V8DOMWrapper::clearNativeInfo(wrapper, npObjectTypeInfo()); | 490 V8DOMWrapper::clearNativeInfo(wrapper, npObjectTypeInfo()); |
| 491 staticNPObjectMap().removeAndDispose(object); | 491 staticNPObjectMap().removeAndDispose(object); |
| 492 _NPN_ReleaseObject(object); | 492 _NPN_ReleaseObject(object); |
| 493 } | 493 } |
| 494 } | 494 } |
| 495 | 495 |
| 496 } // namespace blink | 496 } // namespace blink |
| OLD | NEW |