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

Side by Side Diff: WebCore/bindings/scripts/CodeGeneratorV8.pm

Issue 9572031: Don't be so CRASH happy in the bindings layer. (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 8 years, 9 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
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 Google Inc. 6 # Copyright (C) 2007, 2008, 2009 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 # 10 #
(...skipping 2978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 push(@implContent, " v8::Handle<v8::Context> v8Context = toV8Cont ext(scriptExecutionContext(), m_worldContext);\n"); 2989 push(@implContent, " v8::Handle<v8::Context> v8Context = toV8Cont ext(scriptExecutionContext(), m_worldContext);\n");
2990 push(@implContent, " if (v8Context.IsEmpty())\n"); 2990 push(@implContent, " if (v8Context.IsEmpty())\n");
2991 push(@implContent, " return true;\n\n"); 2991 push(@implContent, " return true;\n\n");
2992 push(@implContent, " v8::Context::Scope scope(v8Context);\n\n"); 2992 push(@implContent, " v8::Context::Scope scope(v8Context);\n\n");
2993 2993
2994 @args = (); 2994 @args = ();
2995 foreach my $param (@params) { 2995 foreach my $param (@params) {
2996 my $paramName = $param->name; 2996 my $paramName = $param->name;
2997 push(@implContent, " v8::Handle<v8::Value> ${paramName}Handle = " . NativeToJSValue($param, $paramName) . ";\n"); 2997 push(@implContent, " v8::Handle<v8::Value> ${paramName}Handle = " . NativeToJSValue($param, $paramName) . ";\n");
2998 push(@implContent, " if (${paramName}Handle.IsEmpty()) {\n"); 2998 push(@implContent, " if (${paramName}Handle.IsEmpty()) {\n");
2999 push(@implContent, " CRASH();\n"); 2999 push(@implContent, " if (!isScriptControllerTerminating() )\n");
3000 push(@implContent, " CRASH();\n");
3000 push(@implContent, " return true;\n"); 3001 push(@implContent, " return true;\n");
3001 push(@implContent, " }\n"); 3002 push(@implContent, " }\n");
3002 push(@args, " ${paramName}Handle"); 3003 push(@args, " ${paramName}Handle");
3003 } 3004 }
3004 3005
3005 if (scalar(@args) > 0) { 3006 if (scalar(@args) > 0) {
3006 push(@implContent, "\n v8::Handle<v8::Value> argv[] = {\n"); 3007 push(@implContent, "\n v8::Handle<v8::Value> argv[] = {\n");
3007 push(@implContent, join(",\n", @args)); 3008 push(@implContent, join(",\n", @args));
3008 push(@implContent, "\n };\n\n"); 3009 push(@implContent, "\n };\n\n");
3009 } else { 3010 } else {
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
3833 3834
3834 sub DebugPrint 3835 sub DebugPrint
3835 { 3836 {
3836 my $output = shift; 3837 my $output = shift;
3837 3838
3838 print $output; 3839 print $output;
3839 print "\n"; 3840 print "\n";
3840 } 3841 }
3841 3842
3842 1; 3843 1;
OLDNEW
« no previous file with comments | « WebCore/bindings/js/WorkerScriptController.cpp ('k') | WebCore/bindings/scripts/test/V8/V8TestCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698