Bug 541131: Include IPDL headers as |include protocol PFoo;|. r=cjones

This commit is contained in:
Thomas Lee 2010-04-26 20:11:46 -05:00
parent 2709c30d60
commit ce2d2bb9d6
40 changed files with 64 additions and 54 deletions

View File

@ -35,7 +35,7 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
include protocol "PPluginInstance.ipdl"; include protocol PPluginInstance;
include "mozilla/plugins/PluginMessageUtils.h"; include "mozilla/plugins/PluginMessageUtils.h";

View File

@ -36,7 +36,7 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
include protocol "PPluginModule.ipdl"; include protocol PPluginModule;
namespace mozilla { namespace mozilla {
namespace plugins { namespace plugins {

View File

@ -37,11 +37,11 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
include protocol "PPluginModule.ipdl"; include protocol PPluginModule;
include protocol "PPluginScriptableObject.ipdl"; include protocol PPluginScriptableObject;
include protocol "PBrowserStream.ipdl"; include protocol PBrowserStream;
include protocol "PPluginStream.ipdl"; include protocol PPluginStream;
include protocol "PStreamNotify.ipdl"; include protocol PStreamNotify;
include "mozilla/plugins/PluginMessageUtils.h"; include "mozilla/plugins/PluginMessageUtils.h";

View File

@ -37,8 +37,8 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
include protocol "PPluginIdentifier.ipdl"; include protocol PPluginIdentifier;
include protocol "PPluginInstance.ipdl"; include protocol PPluginInstance;
include "npapi.h"; include "npapi.h";
include "mozilla/plugins/PluginMessageUtils.h"; include "mozilla/plugins/PluginMessageUtils.h";

View File

@ -37,8 +37,8 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
include protocol "PPluginInstance.ipdl"; include protocol PPluginInstance;
include protocol "PPluginIdentifier.ipdl"; include protocol PPluginIdentifier;
include "npapi.h"; include "npapi.h";
include "npruntime.h"; include "npruntime.h";

View File

@ -35,7 +35,7 @@
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
include protocol "PPluginInstance.ipdl"; include protocol PPluginInstance;
include "mozilla/plugins/PluginMessageUtils.h"; include "mozilla/plugins/PluginMessageUtils.h";

View File

@ -1,6 +1,6 @@
/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
include protocol "PPluginInstance.ipdl"; include protocol PPluginInstance;
include "npapi.h"; include "npapi.h";

View File

@ -177,9 +177,9 @@ class CxxInclude(Node):
self.file = cxxFile self.file = cxxFile
class ProtocolInclude(Node): class ProtocolInclude(Node):
def __init__(self, loc, protocolFile): def __init__(self, loc, protocolName):
Node.__init__(self, loc) Node.__init__(self, loc)
self.file = protocolFile self.file = "%s.ipdl" % protocolName
class UsingStmt(Node): class UsingStmt(Node):
def __init__(self, loc, cxxTypeSpec): def __init__(self, loc, cxxTypeSpec):

View File

@ -249,8 +249,13 @@ def p_CxxIncludeStmt(p):
p[0] = CxxInclude(locFromTok(p, 1), p[2]) p[0] = CxxInclude(locFromTok(p, 1), p[2])
def p_ProtocolIncludeStmt(p): def p_ProtocolIncludeStmt(p):
"""ProtocolIncludeStmt : INCLUDE PROTOCOL STRING""" """ProtocolIncludeStmt : INCLUDE PROTOCOL ID
| INCLUDE PROTOCOL STRING"""
loc = locFromTok(p, 1) loc = locFromTok(p, 1)
if 0 <= p[3].rfind('.ipdl'):
_error(loc, "`include protocol \"P.ipdl\"' syntax is obsolete. Use `include protocol P' instead.")
Parser.current.loc = loc Parser.current.loc = loc
inc = ProtocolInclude(loc, p[3]) inc = ProtocolInclude(loc, p[3])

View File

@ -1,4 +1,4 @@
include protocol "PTestArraysSub.ipdl"; include protocol PTestArraysSub;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,4 +1,4 @@
include protocol "PTestArrays.ipdl"; include protocol PTestArrays;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,5 +1,5 @@
include protocol "PTestDescSub.ipdl"; include protocol PTestDescSub;
include protocol "PTestDescSubsub.ipdl"; include protocol PTestDescSubsub;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,5 +1,5 @@
include protocol "PTestDesc.ipdl"; include protocol PTestDesc;
include protocol "PTestDescSubsub.ipdl"; include protocol PTestDescSubsub;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,5 +1,5 @@
include protocol "PTestDescSub.ipdl"; include protocol PTestDescSub;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,4 +1,4 @@
include protocol "PTestManyChildAllocsSub.ipdl"; include protocol PTestManyChildAllocsSub;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,4 +1,4 @@
include protocol "PTestManyChildAllocs.ipdl"; include protocol PTestManyChildAllocs;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,5 +1,5 @@
include protocol "PTestMultiMgrsLeft.ipdl"; include protocol PTestMultiMgrsLeft;
include protocol "PTestMultiMgrsRight.ipdl"; include protocol PTestMultiMgrsRight;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,5 +1,5 @@
include protocol "PTestMultiMgrsLeft.ipdl"; include protocol PTestMultiMgrsLeft;
include protocol "PTestMultiMgrsRight.ipdl"; include protocol PTestMultiMgrsRight;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,5 +1,5 @@
include protocol "PTestMultiMgrs.ipdl"; include protocol PTestMultiMgrs;
include protocol "PTestMultiMgrsBottom.ipdl"; include protocol PTestMultiMgrsBottom;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,5 +1,5 @@
include protocol "PTestMultiMgrs.ipdl"; include protocol PTestMultiMgrs;
include protocol "PTestMultiMgrsBottom.ipdl"; include protocol PTestMultiMgrsBottom;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,4 +1,4 @@
include protocol "PTestShutdownSub.ipdl"; include protocol PTestShutdownSub;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,5 +1,5 @@
include protocol "PTestShutdown.ipdl"; include protocol PTestShutdown;
include protocol "PTestShutdownSubsub.ipdl"; include protocol PTestShutdownSubsub;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,4 +1,4 @@
include protocol "PTestShutdownSub.ipdl"; include protocol PTestShutdownSub;
namespace mozilla { namespace mozilla {
namespace _ipdltest { namespace _ipdltest {

View File

@ -1,4 +1,4 @@
include protocol "I.DONT.EXIST.ipdl"; include protocol IDONTEXIST;
// error: nonexistent protocol ^^^ // error: nonexistent protocol ^^^

View File

@ -1,4 +1,4 @@
include protocol "managerNoCtor.ipdl"; include protocol managerNoCtor;
protocol managedNoCtor { protocol managedNoCtor {
manager managerNoCtor; manager managerNoCtor;

View File

@ -1,4 +1,4 @@
include protocol "managerNoDtor.ipdl"; include protocol managerNoDtor;
protocol managedNoDtor { protocol managedNoDtor {
manager managerNoDtor; manager managerNoDtor;

View File

@ -1,4 +1,4 @@
include protocol "managedNoCtor.ipdl"; include protocol managedNoCtor;
protocol managerNoCtor { protocol managerNoCtor {
manages managedNoCtor; manages managedNoCtor;

View File

@ -1,4 +1,4 @@
include protocol "managedNoDtor.ipdl"; include protocol managedNoDtor;
protocol managerNoDtor { protocol managerNoDtor {
manages managedNoDtor; manages managedNoDtor;

View File

@ -1,4 +1,4 @@
include protocol "multimanDupMgrsMgr.ipdl"; include protocol multimanDupMgrsMgr;
protocol multimanDupMgrs { protocol multimanDupMgrs {
manager multimanDupMgrsMgr or multimanDupMgrsMgr; manager multimanDupMgrsMgr or multimanDupMgrsMgr;

View File

@ -1,4 +1,4 @@
include protocol "multimanDupMgrs.ipdl"; include protocol multimanDupMgrs;
protocol multimanDupMgrsMgr { protocol multimanDupMgrsMgr {
manages multimanDupMgrs; manages multimanDupMgrs;

View File

@ -0,0 +1,5 @@
include protocol "Foo.ipdl";
protocol oldIncludeSyntax {
};

View File

@ -1,4 +1,4 @@
include protocol "DeleteSub.ipdl"; include protocol DeleteSub;
sync protocol Delete { sync protocol Delete {
manages DeleteSub; manages DeleteSub;

View File

@ -1,4 +1,4 @@
include protocol "Delete.ipdl"; include protocol Delete;
sync protocol DeleteSub { sync protocol DeleteSub {
manager Delete; manager Delete;

View File

@ -1,4 +1,4 @@
include protocol "array_OfActorsSub.ipdl"; include protocol array_OfActorsSub;
protocol array_OfActors { protocol array_OfActors {
manages array_OfActorsSub; manages array_OfActorsSub;

View File

@ -1,4 +1,4 @@
include protocol "array_OfActors.ipdl"; include protocol array_OfActors;
protocol array_OfActorsSub { protocol array_OfActorsSub {
manager array_OfActors; manager array_OfActors;

View File

@ -1,4 +1,4 @@
include protocol "managerProtocol.ipdl"; include protocol managerProtocol;
protocol managedProtocol { protocol managedProtocol {
manager managerProtocol; manager managerProtocol;

View File

@ -1,4 +1,4 @@
include protocol "managedProtocol.ipdl"; include protocol managedProtocol;
// sanity check of managed/manager protocols // sanity check of managed/manager protocols

View File

@ -1,5 +1,5 @@
include protocol "multiManager1.ipdl"; include protocol multiManager1;
include protocol "multiManager2.ipdl"; include protocol multiManager2;
protocol multiManaged { protocol multiManaged {
manager multiManager1 or multiManager2; manager multiManager1 or multiManager2;

View File

@ -1,4 +1,4 @@
include protocol "multiManaged.ipdl"; include protocol multiManaged;
protocol multiManager1 { protocol multiManager1 {
manages multiManaged; manages multiManaged;

View File

@ -1,4 +1,4 @@
include protocol "multiManaged.ipdl"; include protocol multiManaged;
protocol multiManager2 { protocol multiManager2 {
manages multiManaged; manages multiManaged;