DescriptionKill overloaded cast operators in CJS_Value.
The red-flag here is the explicit invocation of things like
params[1].operator CFX_WideString()
rather than
static_cast<CFX_WideString>(params[1])
to invoke the conversion. Turns out the above won't compile due to
ambiguity given the number of implicit constructors for widestrings.
CJS_Value has both constructors and assignment operators for the
primitive types, which means that conversions can take place
unexpectedly in both directions, a second red flag.
We don't want the compiler invoking these at will since it may hide
bugs. In fact, when they are removed, three such places were
discovered.
Also rename ToJSValue to ToV8Value to match the other ToV8xxxxx
functions added.
R=thestig@chromium.org
Committed: https://pdfium.googlesource.com/pdfium/+/e4fde52cc2c827e637c96e8e1f76ba4644cf718a
Patch Set 1 #Patch Set 2 : Remove stray file. #Patch Set 3 : Tabify. #Patch Set 4 : More Tabify. #
Total comments: 2
Patch Set 5 : fix nit. #
Messages
Total messages: 5 (1 generated)
|