DescriptionIDL: Improve CG for attributes with [CachedAttribute]
Avoid converting the C++ value to a V8 value twice (once for the call to
V8HiddenValue::setHiddenValue() and once for the function return value)
by storing the converted value in a local and using that in both places.
The similar case attribute.is_keep_alive_for_gc already worked this way,
but with a different variable name ('wrapper' instead of 'v8Value').
The only significant CG change is that the Vector<String> returned by
Navigator::languages() is now converted only once, and that the same
resulting JavaScript array object is returned on the first access as on
subsequent accesses.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191980
Patch Set 1 #
Messages
Total messages: 6 (2 generated)
|