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

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

Issue 12087054: Revert 140611 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1397/
Patch Set: Created 7 years, 10 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
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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 v8::Handle<v8::Value> argv[] = { obj }; 529 v8::Handle<v8::Value> argv[] = { obj };
530 v8::Local<v8::Value> propsObj = enumerator->Call(v8::Handle<v8::Object>: :Cast(enumeratorObj), ARRAYSIZE_UNSAFE(argv), argv); 530 v8::Local<v8::Value> propsObj = enumerator->Call(v8::Handle<v8::Object>: :Cast(enumeratorObj), ARRAYSIZE_UNSAFE(argv), argv);
531 if (propsObj.IsEmpty()) 531 if (propsObj.IsEmpty())
532 return false; 532 return false;
533 533
534 // Convert the results into an array of NPIdentifiers. 534 // Convert the results into an array of NPIdentifiers.
535 v8::Handle<v8::Array> props = v8::Handle<v8::Array>::Cast(propsObj); 535 v8::Handle<v8::Array> props = v8::Handle<v8::Array>::Cast(propsObj);
536 *count = props->Length(); 536 *count = props->Length();
537 *identifier = static_cast<NPIdentifier*>(malloc(sizeof(NPIdentifier*) * *count)); 537 *identifier = static_cast<NPIdentifier*>(malloc(sizeof(NPIdentifier*) * *count));
538 for (uint32_t i = 0; i < *count; ++i) { 538 for (uint32_t i = 0; i < *count; ++i) {
539 v8::Local<v8::Value> name = props->Get(v8Integer(i, context->GetIsol ate())); 539 v8::Local<v8::Value> name = props->Get(deprecatedV8Integer(i));
540 (*identifier)[i] = getStringIdentifier(v8::Local<v8::String>::Cast(n ame)); 540 (*identifier)[i] = getStringIdentifier(v8::Local<v8::String>::Cast(n ame));
541 } 541 }
542 return true; 542 return true;
543 } 543 }
544 544
545 if (NP_CLASS_STRUCT_VERSION_HAS_ENUM(npObject->_class) && npObject->_class-> enumerate) 545 if (NP_CLASS_STRUCT_VERSION_HAS_ENUM(npObject->_class) && npObject->_class-> enumerate)
546 return npObject->_class->enumerate(npObject, identifier, count); 546 return npObject->_class->enumerate(npObject, identifier, count);
547 547
548 return false; 548 return false;
549 } 549 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 convertV8ObjectToNPVariant(resultObject, npObject, result); 584 convertV8ObjectToNPVariant(resultObject, npObject, result);
585 return true; 585 return true;
586 } 586 }
587 587
588 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class-> construct) 588 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class-> construct)
589 return npObject->_class->construct(npObject, arguments, argumentCount, r esult); 589 return npObject->_class->construct(npObject, arguments, argumentCount, r esult);
590 590
591 return false; 591 return false;
592 } 592 }
OLDNEW
« no previous file with comments | « Source/WebCore/bindings/v8/JavaScriptCallFrame.cpp ('k') | Source/WebCore/bindings/v8/PageScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698