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

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

Issue 110663003: Remove uses of deprecated toWebCoreStringWithUndefinedOrNullCheck(v8::Handle<v8::Value>) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 /* 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Va lue>& info) 360 void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Va lue>& info)
361 { 361 {
362 DOMWindow* impl = V8Window::toNative(info.Holder()); 362 DOMWindow* impl = V8Window::toNative(info.Holder());
363 ExceptionState exceptionState(ExceptionState::ExecutionContext, "showModalDi alog", "Window", info.Holder(), info.GetIsolate()); 363 ExceptionState exceptionState(ExceptionState::ExecutionContext, "showModalDi alog", "Window", info.Holder(), info.GetIsolate());
364 if (!BindingSecurity::shouldAllowAccessToFrame(impl->frame(), exceptionState )) { 364 if (!BindingSecurity::shouldAllowAccessToFrame(impl->frame(), exceptionState )) {
365 exceptionState.throwIfNeeded(); 365 exceptionState.throwIfNeeded();
366 return; 366 return;
367 } 367 }
368 368
369 // FIXME: Handle exceptions properly. 369 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe ck>, urlString, info[0]);
370 String urlString = toWebCoreStringWithUndefinedOrNullCheck(info[0]);
371 DialogHandler handler(info[1]); 370 DialogHandler handler(info[1]);
372 String dialogFeaturesString = toWebCoreStringWithUndefinedOrNullCheck(info[2 ]); 371 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe ck>, dialogFeaturesString, info[2]);
373 372
374 impl->showModalDialog(urlString, dialogFeaturesString, activeDOMWindow(), fi rstDOMWindow(), setUpDialog, &handler); 373 impl->showModalDialog(urlString, dialogFeaturesString, activeDOMWindow(), fi rstDOMWindow(), setUpDialog, &handler);
375 374
376 v8SetReturnValue(info, handler.returnValue(info.GetIsolate())); 375 v8SetReturnValue(info, handler.returnValue(info.GetIsolate()));
377 } 376 }
378 377
379 void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info) 378 void V8Window::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
380 { 379 {
381 DOMWindow* impl = V8Window::toNative(info.Holder()); 380 DOMWindow* impl = V8Window::toNative(info.Holder());
382 ExceptionState exceptionState(ExceptionState::ExecutionContext, "open", "Win dow", info.Holder(), info.GetIsolate()); 381 ExceptionState exceptionState(ExceptionState::ExecutionContext, "open", "Win dow", info.Holder(), info.GetIsolate());
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 v8::Handle<v8::Context> context = frame->script().currentWorldContext(); 565 v8::Handle<v8::Context> context = frame->script().currentWorldContext();
567 if (context.IsEmpty()) 566 if (context.IsEmpty())
568 return v8Undefined(); 567 return v8Undefined();
569 568
570 v8::Handle<v8::Object> global = context->Global(); 569 v8::Handle<v8::Object> global = context->Global();
571 ASSERT(!global.IsEmpty()); 570 ASSERT(!global.IsEmpty());
572 return global; 571 return global;
573 } 572 }
574 573
575 } // namespace WebCore 574 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp ('k') | Source/core/inspector/JavaScriptCallFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698