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

Side by Side Diff: Source/bindings/core/v8/custom/V8DocumentCustom.cpp

Issue 686103005: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 void V8Document::evaluateMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info) 61 void V8Document::evaluateMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
62 { 62 {
63 RefPtrWillBeRawPtr<Document> document = V8Document::toImpl(info.Holder()); 63 RefPtrWillBeRawPtr<Document> document = V8Document::toImpl(info.Holder());
64 ASSERT(document); 64 ASSERT(document);
65 ExceptionState exceptionState(ExceptionState::ExecutionContext, "evaluate", "Document", info.Holder(), info.GetIsolate()); 65 ExceptionState exceptionState(ExceptionState::ExecutionContext, "evaluate", "Document", info.Holder(), info.GetIsolate());
66 TOSTRING_VOID(V8StringResource<>, expression, info[0]); 66 TOSTRING_VOID(V8StringResource<>, expression, info[0]);
67 RefPtrWillBeRawPtr<Node> contextNode = V8Node::toImplWithTypeCheck(info.GetI solate(), info[1]); 67 RefPtrWillBeRawPtr<Node> contextNode = V8Node::toImplWithTypeCheck(info.GetI solate(), info[1]);
68 68
69 const int resolverArgumentIndex = 2; 69 const int resolverArgumentIndex = 2;
70 RefPtrWillBeRawPtr<XPathNSResolver> resolver = toXPathNSResolver(info[resolv erArgumentIndex], info.GetIsolate()); 70 RefPtrWillBeRawPtr<XPathNSResolver> resolver = toXPathNSResolver(info.GetIso late(), info[resolverArgumentIndex]);
71 if (!resolver && !isUndefinedOrNull(info[resolverArgumentIndex])) { 71 if (!resolver && !isUndefinedOrNull(info[resolverArgumentIndex])) {
72 exceptionState.throwTypeError(ExceptionMessages::argumentNullOrIncorrect Type(resolverArgumentIndex + 1, "XPathNSResolver")); 72 exceptionState.throwTypeError(ExceptionMessages::argumentNullOrIncorrect Type(resolverArgumentIndex + 1, "XPathNSResolver"));
73 exceptionState.throwIfNeeded(); 73 exceptionState.throwIfNeeded();
74 return; 74 return;
75 } 75 }
76 76
77 int type = toInt32(info[3]); 77 int type = toInt32(info[3]);
78 RefPtrWillBeRawPtr<XPathResult> inResult = V8XPathResult::toImplWithTypeChec k(info.GetIsolate(), info[4]); 78 RefPtrWillBeRawPtr<XPathResult> inResult = V8XPathResult::toImplWithTypeChec k(info.GetIsolate(), info[4]);
79 TONATIVE_VOID(RefPtrWillBeRawPtr<XPathResult>, result, DocumentXPathEvaluato r::evaluate(*document, expression, contextNode.get(), resolver.release(), type, inResult.get(), exceptionState)); 79 TONATIVE_VOID(RefPtrWillBeRawPtr<XPathResult>, result, DocumentXPathEvaluato r::evaluate(*document, expression, contextNode.get(), resolver.release(), type, inResult.get(), exceptionState));
80 if (exceptionState.throwIfNeeded()) 80 if (exceptionState.throwIfNeeded())
81 return; 81 return;
82 82
83 v8SetReturnValueFast(info, result.release(), document.get()); 83 v8SetReturnValueFast(info, result.release(), document.get());
84 } 84 }
85 85
86 } // namespace blink 86 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/custom/V8CustomEventCustom.cpp ('k') | Source/bindings/core/v8/custom/V8MessageEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698