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

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

Issue 21006006: Add forEach() to CSSVariablesMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and review changes Created 7 years, 2 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 4719 matching lines...) Expand 10 before | Expand all | Expand 10 after
4730 $code .= " v8::Context::Scope scope(v8Context);\n\n"; 4730 $code .= " v8::Context::Scope scope(v8Context);\n\n";
4731 4731
4732 my $thisObjectHandle = ""; 4732 my $thisObjectHandle = "";
4733 if ($callWithThisValue) { 4733 if ($callWithThisValue) {
4734 $code .= " v8::Handle<v8::Value> thisHandle = thisValue.v8Val ue();\n"; 4734 $code .= " v8::Handle<v8::Value> thisHandle = thisValue.v8Val ue();\n";
4735 $code .= " if (thisHandle.IsEmpty()) {\n"; 4735 $code .= " if (thisHandle.IsEmpty()) {\n";
4736 $code .= " if (!isScriptControllerTerminating())\n"; 4736 $code .= " if (!isScriptControllerTerminating())\n";
4737 $code .= " CRASH();\n"; 4737 $code .= " CRASH();\n";
4738 $code .= " return true;\n"; 4738 $code .= " return true;\n";
4739 $code .= " }\n"; 4739 $code .= " }\n";
4740 $code .= " ASSERT(thisHandle->isObject());\n"; 4740 $code .= " ASSERT(thisHandle->IsObject());\n";
4741 $thisObjectHandle = "v8::Handle<v8::Object>::Cast(thisHandle), " ; 4741 $thisObjectHandle = "v8::Handle<v8::Object>::Cast(thisHandle), " ;
4742 } 4742 }
4743 @args = (); 4743 @args = ();
4744 foreach my $param (@params) { 4744 foreach my $param (@params) {
4745 my $paramName = $param->name; 4745 my $paramName = $param->name;
4746 $code .= NativeToJSValue($param->type, $param->extendedAttribute s, $paramName, " ", "v8::Handle<v8::Value> ${paramName}Handle =", "v8::Handle <v8::Object>()", "isolate", "") . "\n"; 4746 $code .= NativeToJSValue($param->type, $param->extendedAttribute s, $paramName, " ", "v8::Handle<v8::Value> ${paramName}Handle =", "v8::Handle <v8::Object>()", "isolate", "") . "\n";
4747 $code .= " if (${paramName}Handle.IsEmpty()) {\n"; 4747 $code .= " if (${paramName}Handle.IsEmpty()) {\n";
4748 $code .= " if (!isScriptControllerTerminating())\n"; 4748 $code .= " if (!isScriptControllerTerminating())\n";
4749 $code .= " CRASH();\n"; 4749 $code .= " CRASH();\n";
4750 $code .= " return true;\n"; 4750 $code .= " return true;\n";
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
6093 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { 6093 if ($currentInterface->extendedAttributes->{$extendedAttribute}) {
6094 $found = 1; 6094 $found = 1;
6095 } 6095 }
6096 return 1 if $found; 6096 return 1 if $found;
6097 }, 0); 6097 }, 0);
6098 6098
6099 return $found; 6099 return $found;
6100 } 6100 }
6101 6101
6102 1; 6102 1;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698