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

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

Issue 23995018: Fix lifetime handling of SVGPropertyTearOffs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix ownership 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
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 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 my $wrappedValue; 1576 my $wrappedValue;
1577 if (IsSVGTypeWithWritablePropertiesNeedingTearOff($attrType) and not def ined $attribute->extendedAttributes->{"Immutable"}) { 1577 if (IsSVGTypeWithWritablePropertiesNeedingTearOff($attrType) and not def ined $attribute->extendedAttributes->{"Immutable"}) {
1578 my $getter = $expression; 1578 my $getter = $expression;
1579 $getter =~ s/imp->//; 1579 $getter =~ s/imp->//;
1580 $getter =~ s/\(\)//; 1580 $getter =~ s/\(\)//;
1581 1581
1582 my $updateMethod = "&${implClassName}::update" . FirstLetterToUpperC ase($getter); 1582 my $updateMethod = "&${implClassName}::update" . FirstLetterToUpperC ase($getter);
1583 1583
1584 my $selfIsTearOffType = IsSVGTypeNeedingTearOff($interfaceName); 1584 my $selfIsTearOffType = IsSVGTypeNeedingTearOff($interfaceName);
1585 if ($selfIsTearOffType) { 1585 if ($selfIsTearOffType) {
1586 AddToImplIncludes("core/svg/properties/SVGStaticPropertyWithPare ntTearOff.h"); 1586 AddToImplIncludes("core/svg/properties/SVGMatrixTearOff.h");
1587 $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyWithParen tTearOff<$implClassName, /; 1587 # FIXME: Don't create a new one everytime we access the matrix p roperty. This means, e.g, === won't work.
1588 1588 $wrappedValue = "WTF::getPtr(SVGMatrixTearOff::create(wrapper, $ expression))";
1589 $wrappedValue = "WTF::getPtr(${tearOffType}::create(wrapper, $ex pression, $updateMethod))";
1590 } else { 1589 } else {
1591 AddToImplIncludes("core/svg/properties/SVGStaticPropertyTearOff. h"); 1590 AddToImplIncludes("core/svg/properties/SVGStaticPropertyTearOff. h");
1592 $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$ implClassName, /; 1591 $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$ implClassName, /;
1593 1592
1594 $wrappedValue = "WTF::getPtr(${tearOffType}::create(imp, $expres sion, $updateMethod))"; 1593 $wrappedValue = "WTF::getPtr(${tearOffType}::create(imp, $expres sion, $updateMethod))";
1595 } 1594 }
1596 } elsif ($tearOffType =~ /SVGStaticListPropertyTearOff/) { 1595 } elsif ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
1597 $wrappedValue = "WTF::getPtr(${tearOffType}::create(imp, $expres sion))"; 1596 $wrappedValue = "WTF::getPtr(${tearOffType}::create(imp, $expres sion))";
1598 } elsif ($tearOffType =~ /SVG(Point|PathSeg)List/) { 1597 } elsif ($tearOffType =~ /SVG(Point|PathSeg)List/) {
1599 $wrappedValue = "WTF::getPtr($expression)"; 1598 $wrappedValue = "WTF::getPtr($expression)";
(...skipping 4411 matching lines...) Expand 10 before | Expand all | Expand 10 after
6011 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { 6010 if ($currentInterface->extendedAttributes->{$extendedAttribute}) {
6012 $found = 1; 6011 $found = 1;
6013 } 6012 }
6014 return 1 if $found; 6013 return 1 if $found;
6015 }, 0); 6014 }, 0);
6016 6015
6017 return $found; 6016 return $found;
6018 } 6017 }
6019 6018
6020 1; 6019 1;
OLDNEW
« no previous file with comments | « LayoutTests/svg/transforms/svg-matrix-tearoff-crash-expected.txt ('k') | Source/core/svg/properties/SVGMatrixTearOff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698