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

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

Issue 74133005: Remove several uses of toWebCoreStringWithNullCheck(v8::Handle<v8::Value>) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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) 2007-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2009 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 27 matching lines...) Expand all
38 #include "core/html/HTMLFrameElement.h" 38 #include "core/html/HTMLFrameElement.h"
39 #include "core/html/parser/HTMLParserIdioms.h" 39 #include "core/html/parser/HTMLParserIdioms.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 using namespace HTMLNames; 43 using namespace HTMLNames;
44 44
45 void V8HTMLFrameElement::locationAttributeSetterCustom(v8::Local<v8::Value> valu e, const v8::PropertyCallbackInfo<void>& info) 45 void V8HTMLFrameElement::locationAttributeSetterCustom(v8::Local<v8::Value> valu e, const v8::PropertyCallbackInfo<void>& info)
46 { 46 {
47 HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder()); 47 HTMLFrameElement* frame = V8HTMLFrameElement::toNative(info.Holder());
48 String locationValue = toWebCoreStringWithNullCheck(value); 48 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, locati onValue, value);
49 49
50 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 50 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
51 if (protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(locationValue)) & & !BindingSecurity::shouldAllowAccessToFrame(frame->contentFrame(), exceptionSta te)) { 51 if (protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(locationValue)) & & !BindingSecurity::shouldAllowAccessToFrame(frame->contentFrame(), exceptionSta te)) {
52 exceptionState.throwIfNeeded(); 52 exceptionState.throwIfNeeded();
53 return; 53 return;
54 } 54 }
55 55
56 frame->setLocation(locationValue); 56 frame->setLocation(locationValue);
57 } 57 }
58 58
59 } // namespace WebCore 59 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698