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

Side by Side Diff: Source/bindings/scripts/code_generator_v8.pm

Issue 129793007: Remove dead code path (typed array interfaces) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
5 # Copyright (C) 2006 Apple Computer, Inc. 5 # Copyright (C) 2006 Apple Computer, Inc.
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc.
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved.
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. 10 # Copyright (C) 2012 Ericsson AB. All rights reserved.
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 } 483 }
484 484
485 sub HeaderFilesForInterface 485 sub HeaderFilesForInterface
486 { 486 {
487 my $interfaceName = shift; 487 my $interfaceName = shift;
488 my $implClassName = shift; 488 my $implClassName = shift;
489 489
490 my @includes = (); 490 my @includes = ();
491 if (IsPrimitiveType($interfaceName) or IsEnumType($interfaceName) or IsCallb ackFunctionType($interfaceName)) { 491 if (IsPrimitiveType($interfaceName) or IsEnumType($interfaceName) or IsCallb ackFunctionType($interfaceName)) {
492 # Not interface type, no header files 492 # Not interface type, no header files
493 } elsif (IsTypedArrayType($interfaceName)) {
494 push(@includes, "wtf/${interfaceName}.h");
495 } else { 493 } else {
496 my $idlFilename = Cwd::abs_path(IDLFileForInterface($interfaceName)) or die("Could NOT find IDL file for interface \"$interfaceName\" $!\n"); 494 my $idlFilename = Cwd::abs_path(IDLFileForInterface($interfaceName)) or die("Could NOT find IDL file for interface \"$interfaceName\" $!\n");
497 my $idlRelPath = File::Spec->abs2rel($idlFilename, $sourceRoot); 495 my $idlRelPath = File::Spec->abs2rel($idlFilename, $sourceRoot);
498 push(@includes, dirname($idlRelPath) . "/" . $implClassName . ".h"); 496 push(@includes, dirname($idlRelPath) . "/" . $implClassName . ".h");
499 } 497 }
500 return @includes; 498 return @includes;
501 } 499 }
502 500
503 sub NeedsVisitDOMWrapper 501 sub NeedsVisitDOMWrapper
504 { 502 {
(...skipping 4632 matching lines...) Expand 10 before | Expand all | Expand 10 after
5137 } 5135 }
5138 END 5136 END
5139 } 5137 }
5140 5138
5141 $code .= <<END; 5139 $code .= <<END;
5142 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); 5140 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
5143 if (UNLIKELY(wrapper.IsEmpty())) 5141 if (UNLIKELY(wrapper.IsEmpty()))
5144 return wrapper; 5142 return wrapper;
5145 5143
5146 END 5144 END
5147 if (IsTypedArrayType($interface->name)) {
5148 AddToImplIncludes("bindings/v8/custom/V8ArrayBufferCustom.h");
5149 $code .= <<END;
5150 impl->buffer()->setDeallocationObserver(V8ArrayBufferDeallocationObserver::i nstanceTemplate());
5151 END
5152 }
5153
5154 if (InheritsInterface($interface, "AudioBuffer")) { 5145 if (InheritsInterface($interface, "AudioBuffer")) {
5155 AddToImplIncludes("modules/webaudio/AudioBuffer.h"); 5146 AddToImplIncludes("modules/webaudio/AudioBuffer.h");
5156 $code .= <<END; 5147 $code .= <<END;
5157 for (unsigned i = 0, n = impl->numberOfChannels(); i < n; i++) { 5148 for (unsigned i = 0, n = impl->numberOfChannels(); i < n; i++) {
5158 Float32Array* channelData = impl->getChannelData(i); 5149 Float32Array* channelData = impl->getChannelData(i);
5159 channelData->buffer()->setDeallocationObserver(V8ArrayBufferDeallocation Observer::instanceTemplate()); 5150 channelData->buffer()->setDeallocationObserver(V8ArrayBufferDeallocation Observer::instanceTemplate());
5160 } 5151 }
5161 END 5152 END
5162 } 5153 }
5163 5154
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
6400 if ($parameter->type eq "SerializedScriptValue") { 6391 if ($parameter->type eq "SerializedScriptValue") {
6401 return 1; 6392 return 1;
6402 } elsif (IsIntegerType($parameter->type)) { 6393 } elsif (IsIntegerType($parameter->type)) {
6403 return 1; 6394 return 1;
6404 } 6395 }
6405 } 6396 }
6406 return 0; 6397 return 0;
6407 } 6398 }
6408 6399
6409 1; 6400 1;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698