refactor: pass base::Value by value in JS API implementations (#20809)
* refactor: move the arg instead of const reference it * refactor: avoid unnecessary copies of base::Value in arg * refactor: pass-by-value in dict_util * refactor: avoid unnecessary reference
This commit is contained in:
parent
c03ed6d3a1
commit
0ab9cc30d2
26 changed files with 108 additions and 144 deletions
|
@ -143,7 +143,7 @@ void PrintPreviewMessageHandler::OnPrintPreviewCancelled(
|
|||
}
|
||||
|
||||
void PrintPreviewMessageHandler::PrintToPDF(
|
||||
const base::DictionaryValue& options,
|
||||
base::DictionaryValue options,
|
||||
electron::util::Promise<v8::Local<v8::Value>> promise) {
|
||||
int request_id;
|
||||
options.GetInteger(printing::kPreviewRequestID, &request_id);
|
||||
|
|
|
@ -31,7 +31,7 @@ class PrintPreviewMessageHandler
|
|||
public:
|
||||
~PrintPreviewMessageHandler() override;
|
||||
|
||||
void PrintToPDF(const base::DictionaryValue& options,
|
||||
void PrintToPDF(base::DictionaryValue options,
|
||||
util::Promise<v8::Local<v8::Value>> promise);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue