Closed Bug 524220 Opened 11 years ago Closed 10 years ago

IPDL: Add a |nullable| type qualifier for actor params/returns

Categories

(Core :: IPC, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: cjones, Assigned: cjones)

References

Details

Attachments

(1 file)

Currently in IPDL, any message can pass in a NULL actor value, but I'm not sure this is desirable.  I think the instead we should make actor nullability part of IPDL's type system.  So one could say

  Msg(nullable FooActor foo) return (BarActor bar);

and C++ would be allowed to pass a NULL |foo|, but not a NULL |bar|.

There's also a regression caused by bug 506171 where invalid actor IDs silently result in NULL actors being passed to C++.  Invalid actor IDs should always cause a loud error.  I'll fix that as part of this bug.
I hear the places we're using NULL actors now are

 o PPluginScriptableObject:Variant
 o PPluginInstance::PBrowserStream `notifyData`
pretty much anywhere in npruntime where we use PPluginScriptableObject
Attached patch v1Splinter Review
Attachment #409201 - Flags: review?(bent.mozilla)
Comment on attachment 409201 [details] [diff] [review]
v1

Looks good, let's get this in, stat.
Attachment #409201 - Flags: review?(bent.mozilla) → review+
Pushed http://hg.mozilla.org/projects/electrolysis/rev/3716cd3234f3
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.