Bug 62947 - Don't use PassRefPtr variables in the V8 bindings generator
Summary: Don't use PassRefPtr variables in the V8 bindings generator
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
Depends on:
Reported: 2011-06-18 19:21 PDT by Anders Carlsson
Modified: 2011-06-20 10:55 PDT (History)
1 user (show)

See Also:

Patch (1.19 KB, patch)
2011-06-18 19:23 PDT, Anders Carlsson
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2011-06-18 19:21:35 PDT
Don't use PassRefPtr variables in the V8 bindings generator
Comment 1 Anders Carlsson 2011-06-18 19:23:10 PDT
The V8 bindings generator will generate local variables of type PassRefPtr<DOMStringList> and then try to assign into them. This will break when https://bugs.webkit.org/show_bug.cgi?id=62940 is landed so I'll try to remove the offending line in CodeGeneratorV8.pm to see what else breaks. The offending line is

    return "PassRefPtr<DOMStringList>" if $type eq "DOMStringList" and $isParameter;

and it was added as part of https://bugs.webkit.org/show_bug.cgi?id=56950
Comment 2 Anders Carlsson 2011-06-18 19:23:36 PDT
Created attachment 97713 [details]
Comment 3 Sam Weinig 2011-06-19 14:08:23 PDT
Anders, are you waiting for something to mark this for review?  It looks fine to me.
Comment 4 Anders Carlsson 2011-06-20 10:53:05 PDT
With this patch, addSpellcheckRangeCallback in V8HTMLTextAreaElement.cpp now looks like:

--- V8HTMLTextAreaElement-baseline.cpp	2011-06-20 10:51:22.000000000 -0700
+++ V8HTMLTextAreaElement.cpp	2011-06-20 10:51:49.000000000 -0700
@@ -367,7 +367,7 @@
         imp->addSpellcheckRange(start, length);
         return v8::Handle<v8::Value>();
-    EXCEPTION_BLOCK(PassRefPtr<DOMStringList>, suggestions, v8ValueToWebCoreDOMStringList(args[2]));
+    EXCEPTION_BLOCK(RefPtr<DOMStringList>, suggestions, v8ValueToWebCoreDOMStringList(args[2]));
     if (args.Length() <= 3) {
         imp->addSpellcheckRange(start, length, suggestions);
         return v8::Handle<v8::Value>();
Comment 5 Adam Barth 2011-06-20 10:53:53 PDT
Comment on attachment 97713 [details]

+        No new tests. (OOPS!)

^^^ You'll probably want to remove this line from the ChangeLog.
Comment 6 Anders Carlsson 2011-06-20 10:55:32 PDT
Committed r89261: <http://trac.webkit.org/changeset/89261>