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

Side by Side Diff: Source/bindings/v8/NPV8Object.cpp

Issue 24118003: Pass isolate to v8::Undefined() function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/ExceptionState.h ('k') | Source/bindings/v8/ScriptPreprocessor.cpp » ('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) 2004, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2007, 2008, 2009 Google, Inc. All rights reserved. 3 * Copyright (C) 2007, 2008, 2009 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 437 v8::Isolate* isolate = v8::Isolate::GetCurrent();
438 v8::HandleScope handleScope(isolate); 438 v8::HandleScope handleScope(isolate);
439 v8::Handle<v8::Context> context = toV8Context(npp, npObject); 439 v8::Handle<v8::Context> context = toV8Context(npp, npObject);
440 if (context.IsEmpty()) 440 if (context.IsEmpty())
441 return false; 441 return false;
442 v8::Context::Scope scope(context); 442 v8::Context::Scope scope(context);
443 ExceptionCatcher exceptionCatcher; 443 ExceptionCatcher exceptionCatcher;
444 444
445 v8::Handle<v8::Object> obj = v8::Local<v8::Object>::New(isolate, object->v8O bject); 445 v8::Handle<v8::Object> obj = v8::Local<v8::Object>::New(isolate, object->v8O bject);
446 // FIXME: Verify that setting to undefined is right. 446 // FIXME: Verify that setting to undefined is right.
447 obj->Set(npIdentifierToV8Identifier(propertyName), v8::Undefined()); 447 obj->Set(npIdentifierToV8Identifier(propertyName), v8::Undefined(isolate));
448 return true; 448 return true;
449 } 449 }
450 450
451 bool _NPN_HasProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName) 451 bool _NPN_HasProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName)
452 { 452 {
453 if (!npObject) 453 if (!npObject)
454 return false; 454 return false;
455 455
456 if (V8NPObject* object = npObjectToV8NPObject(npObject)) { 456 if (V8NPObject* object = npObjectToV8NPObject(npObject)) {
457 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 457 v8::Isolate* isolate = v8::Isolate::GetCurrent();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 convertV8ObjectToNPVariant(resultObject, npObject, result); 606 convertV8ObjectToNPVariant(resultObject, npObject, result);
607 return true; 607 return true;
608 } 608 }
609 609
610 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class-> construct) 610 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class-> construct)
611 return npObject->_class->construct(npObject, arguments, argumentCount, r esult); 611 return npObject->_class->construct(npObject, arguments, argumentCount, r esult);
612 612
613 return false; 613 return false;
614 } 614 }
OLDNEW
« no previous file with comments | « Source/bindings/v8/ExceptionState.h ('k') | Source/bindings/v8/ScriptPreprocessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698