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

Side by Side Diff: Source/bindings/tests/results/V8TestTypedefs.cpp

Issue 75163003: Remove deprecated v8::External::New calls (blink side) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 0, 0, 530 0, 0,
531 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), 531 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods),
532 isolate, currentWorldType); 532 isolate, currentWorldType);
533 UNUSED_PARAM(defaultSignature); 533 UNUSED_PARAM(defaultSignature);
534 functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback); 534 functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback);
535 functionTemplate->SetLength(2); 535 functionTemplate->SetLength(2);
536 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 536 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
537 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 537 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
538 UNUSED_PARAM(instanceTemplate); 538 UNUSED_PARAM(instanceTemplate);
539 UNUSED_PARAM(prototypeTemplate); 539 UNUSED_PARAM(prototypeTemplate);
540 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("TestSubObj"), TestTypedefsV8Internal::TestTypedefsConstructorGetter, 0, v8::External::New(con st_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo)), static_cast<v8::Prop ertyAttribute>(v8::DontEnum), v8::Handle<v8::AccessorSignature>(), static_cast<v 8::AccessControl>(v8::DEFAULT)); 540 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("TestSubObj"), TestTypedefsV8Internal::TestTypedefsConstructorGetter, 0, v8::External::New(iso late, const_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo)), static_cast <v8::PropertyAttribute>(v8::DontEnum), v8::Handle<v8::AccessorSignature>(), stat ic_cast<v8::AccessControl>(v8::DEFAULT));
541 541
542 // Custom toString template 542 // Custom toString template
543 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c urrent()->toStringTemplate()); 543 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c urrent()->toStringTemplate());
544 return functionTemplate; 544 return functionTemplate;
545 } 545 }
546 546
547 v8::Handle<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* isolat e, WrapperWorldType currentWorldType) 547 v8::Handle<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* isolat e, WrapperWorldType currentWorldType)
548 { 548 {
549 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 549 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
550 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo); 550 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &wrapperTypeI nfo, wrapper, isolate, WrapperConfiguration::Independent); 590 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &wrapperTypeI nfo, wrapper, isolate, WrapperConfiguration::Independent);
591 return wrapper; 591 return wrapper;
592 } 592 }
593 593
594 void V8TestTypedefs::derefObject(void* object) 594 void V8TestTypedefs::derefObject(void* object)
595 { 595 {
596 fromInternalPointer(object)->deref(); 596 fromInternalPointer(object)->deref();
597 } 597 }
598 598
599 } // namespace WebCore 599 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698