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

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

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 | « no previous file | Source/bindings/tests/results/V8TestObject.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 # 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 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 } 1501 }
1502 1502
1503 if ($useExceptions) { 1503 if ($useExceptions) {
1504 if ($useExceptions) { 1504 if ($useExceptions) {
1505 $code .= " if (UNLIKELY(es.throwIfNeeded()))\n"; 1505 $code .= " if (UNLIKELY(es.throwIfNeeded()))\n";
1506 $code .= " return;\n"; 1506 $code .= " return;\n";
1507 } 1507 }
1508 1508
1509 if (ExtendedAttributeContains($attribute->extendedAttributes->{"Call With"}, "ScriptState")) { 1509 if (ExtendedAttributeContains($attribute->extendedAttributes->{"Call With"}, "ScriptState")) {
1510 $code .= " if (state.hadException()) {\n"; 1510 $code .= " if (state.hadException()) {\n";
1511 $code .= " throwError(state.exception());\n"; 1511 $code .= " throwError(state.exception(), info.GetIsolate( ));\n";
1512 $code .= " return;\n"; 1512 $code .= " return;\n";
1513 $code .= " }\n"; 1513 $code .= " }\n";
1514 } 1514 }
1515 } 1515 }
1516 1516
1517 $expression = "v"; 1517 $expression = "v";
1518 $expression .= ".release()" if (IsRefPtrType($returnType)); 1518 $expression .= ".release()" if (IsRefPtrType($returnType));
1519 } else { 1519 } else {
1520 # Can inline the function call into the return statement to avoid overhe ad of using a Ref<> temporary 1520 # Can inline the function call into the return statement to avoid overhe ad of using a Ref<> temporary
1521 $expression = $getterString; 1521 $expression = $getterString;
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 unshift(@arguments, @$arg); 1936 unshift(@arguments, @$arg);
1937 $code .= " ${functionName}(" . join(", ", @arguments) . ");\n"; 1937 $code .= " ${functionName}(" . join(", ", @arguments) . ");\n";
1938 } 1938 }
1939 1939
1940 if ($useExceptions) { 1940 if ($useExceptions) {
1941 $code .= " es.throwIfNeeded();\n"; 1941 $code .= " es.throwIfNeeded();\n";
1942 } 1942 }
1943 1943
1944 if (ExtendedAttributeContains($attribute->extendedAttributes->{"CallWith"}, "ScriptState")) { 1944 if (ExtendedAttributeContains($attribute->extendedAttributes->{"CallWith"}, "ScriptState")) {
1945 $code .= " if (state.hadException())\n"; 1945 $code .= " if (state.hadException())\n";
1946 $code .= " throwError(state.exception());\n"; 1946 $code .= " throwError(state.exception(), info.GetIsolate());\n";
1947 } 1947 }
1948 1948
1949 if ($svgNativeType) { 1949 if ($svgNativeType) {
1950 if ($useExceptions) { 1950 if ($useExceptions) {
1951 $code .= " if (!es.hadException())\n"; 1951 $code .= " if (!es.hadException())\n";
1952 $code .= " wrapper->commitChange();\n"; 1952 $code .= " wrapper->commitChange();\n";
1953 } else { 1953 } else {
1954 $code .= " wrapper->commitChange();\n"; 1954 $code .= " wrapper->commitChange();\n";
1955 } 1955 }
1956 } 1956 }
(...skipping 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after
4924 4924
4925 if ($function->extendedAttributes->{"RaisesException"}) { 4925 if ($function->extendedAttributes->{"RaisesException"}) {
4926 $code .= $indent . "if (es.throwIfNeeded())\n"; 4926 $code .= $indent . "if (es.throwIfNeeded())\n";
4927 $code .= $indent . " return;\n"; 4927 $code .= $indent . " return;\n";
4928 } 4928 }
4929 4929
4930 if (ExtendedAttributeContains($callWith, "ScriptState")) { 4930 if (ExtendedAttributeContains($callWith, "ScriptState")) {
4931 $code .= $indent . "if (state.hadException()) {\n"; 4931 $code .= $indent . "if (state.hadException()) {\n";
4932 $code .= $indent . " v8::Local<v8::Value> exception = state.exception ();\n"; 4932 $code .= $indent . " v8::Local<v8::Value> exception = state.exception ();\n";
4933 $code .= $indent . " state.clearException();\n"; 4933 $code .= $indent . " state.clearException();\n";
4934 $code .= $indent . " throwError(exception);\n"; 4934 $code .= $indent . " throwError(exception, args.GetIsolate());\n";
4935 $code .= $indent . " return;\n"; 4935 $code .= $indent . " return;\n";
4936 $code .= $indent . "}\n"; 4936 $code .= $indent . "}\n";
4937 } 4937 }
4938 4938
4939 if ($isSVGTearOffType) { 4939 if ($isSVGTearOffType) {
4940 AddToImplIncludes("V8$returnType.h"); 4940 AddToImplIncludes("V8$returnType.h");
4941 AddToImplIncludes("core/svg/properties/SVGPropertyTearOff.h"); 4941 AddToImplIncludes("core/svg/properties/SVGPropertyTearOff.h");
4942 my $svgNativeType = GetSVGTypeNeedingTearOff($returnType); 4942 my $svgNativeType = GetSVGTypeNeedingTearOff($returnType);
4943 # FIXME: Update for all ScriptWrappables. 4943 # FIXME: Update for all ScriptWrappables.
4944 if (IsDOMNodeType($interfaceName)) { 4944 if (IsDOMNodeType($interfaceName)) {
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
6011 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { 6011 if ($currentInterface->extendedAttributes->{$extendedAttribute}) {
6012 $found = 1; 6012 $found = 1;
6013 } 6013 }
6014 return 1 if $found; 6014 return 1 if $found;
6015 }, 0); 6015 }, 0);
6016 6016
6017 return $found; 6017 return $found;
6018 } 6018 }
6019 6019
6020 1; 6020 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698