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

Side by Side Diff: Source/bindings/v8/custom/V8WindowCustom.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 /* 1 /*
2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 { 78 {
79 int argumentCount = args.Length(); 79 int argumentCount = args.Length();
80 80
81 if (argumentCount < 1) 81 if (argumentCount < 1)
82 return; 82 return;
83 83
84 DOMWindow* imp = V8Window::toNative(args.Holder()); 84 DOMWindow* imp = V8Window::toNative(args.Holder());
85 ScriptExecutionContext* scriptContext = static_cast<ScriptExecutionContext*> (imp->document()); 85 ScriptExecutionContext* scriptContext = static_cast<ScriptExecutionContext*> (imp->document());
86 86
87 if (!scriptContext) { 87 if (!scriptContext) {
88 es.throwDOMException(InvalidAccessError); 88 es.throwUninformativeAndGenericDOMException(InvalidAccessError);
89 return; 89 return;
90 } 90 }
91 91
92 v8::Handle<v8::Value> function = args[0]; 92 v8::Handle<v8::Value> function = args[0];
93 String functionString; 93 String functionString;
94 if (!function->IsFunction()) { 94 if (!function->IsFunction()) {
95 if (function->IsString()) { 95 if (function->IsString()) {
96 functionString = toWebCoreString(function.As<v8::String>()); 96 functionString = toWebCoreString(function.As<v8::String>());
97 } else { 97 } else {
98 v8::Handle<v8::Value> v8String = function->ToString(); 98 v8::Handle<v8::Value> v8String = function->ToString();
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 v8::Handle<v8::Context> context = frame->script()->currentWorldContext(); 557 v8::Handle<v8::Context> context = frame->script()->currentWorldContext();
558 if (context.IsEmpty()) 558 if (context.IsEmpty())
559 return v8Undefined(); 559 return v8Undefined();
560 560
561 v8::Handle<v8::Object> global = context->Global(); 561 v8::Handle<v8::Object> global = context->Global();
562 ASSERT(!global.IsEmpty()); 562 ASSERT(!global.IsEmpty());
563 return global; 563 return global;
564 } 564 }
565 565
566 } // namespace WebCore 566 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp ('k') | Source/core/css/CSSMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698