Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: Source/bindings/core/v8/V8NPObject.cpp

Issue 684083002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/V8ThrowException.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/NPV8Object.cpp ('k') | Source/bindings/core/v8/V8ThrowException.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698